I am trying to compute some value in getBankAccountFixedPrefix function in my react component.. This is called in fixedValue={this.getBankAccountFixedPrefix()} of AUITextInputPartialEdit tag below.... i am getting the below error... I am trying to understand the mistake.. i need some directions here..
ERROR in ./app/fields/BankAccountNumber/index.tsx 55:51
Module parse failed: Unexpected token (55:51)
File was processed with these loaders:
* ./node_modules/awesome-typescript-loader/dist/entry.js
You may need an additional loader to handle the result of these loaders.
| return bankAccountFixedPrefix;
| };
> BankAccountNumber.prototype.return = function (, div) { };
| return BankAccountNumber;
| }(React.Component));
@ ./app/components/Forms/AccountDetailsForm/index.tsx 19:26-70
@ ./app/components/ContactAndAccountDetailsPage/index.tsx
@ ./app/components/ApplicationForms/index.tsx
@ ./app/components/Application/index.tsx
@ ./app/index.tsx
class BankAccountNumber extends React.Component<IProps> {
public render() {
console.log("this.props inside BankAccountNumber: " + JSON.stringify(this.props));
const translatedStrings = {
bankAccountGuidanceLabel: stringIDs.bankAccountGuidanceLabel,
deBankAccountPlaceholder: stringIDs.deBankAccountPlaceholder,
bankAccountLabelAlternate: stringIDs.bankAccountLabelAlternate,
};
public getBankAccountFixedPrefix() {
let bankAccountFixedPrefix = ApplicationConstants.deBankAccountFixedPrefix;
if(this.props.launchAustria === true && this.props.countryOfResidence === "Austria") {
bankAccountFixedPrefix = ApplicationConstants.atBankAccountFixedPrefix;
}
console.log("bankAccountFixedPrefix: " + bankAccountFixedPrefix);
return bankAccountFixedPrefix;
}
return (
<div>
<Section spacing="medium">
<FormLabel>{translatedStrings.bankAccountLabelAlternate} {this.props.firstName} {this.props.lastName}</FormLabel>
<AUITextInputPartialEdit
id={FieldId.bankAccount}
spacing="micro"
gridUnits={12}
name={FieldId.bankAccount}
formId={this.props.formId}
placeholder={translatedStrings.deBankAccountPlaceholder}
fixedValue={this.getBankAccountFixedPrefix()}
status={this.props.errorMessage ? 'error' : 'unspecified'}
textInputType="tel"
/>
<Text textColor="tertiary" textSize="mini">
{translatedStrings.bankAccountGuidanceLabel}
</Text>
<LineBreak />
<ErrorMessageComponent errorMessage={this.props.errorMessage} />
</Section>
</div>
);
}
}
export default connector(BankAccountNumber);
return?