Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] fix: Added translate key for street name based on the form #6930

Merged
merged 1 commit into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pages/ReimbursementAccount/AddressForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import StatePicker from '../../components/StatePicker';
import Text from '../../components/Text';

const propTypes = {

/** Translate key for Street name */
streetTranslationKey: PropTypes.string.isRequired,

/** Callback fired when a field changes. Passes args as {[fieldName]: val} */
onFieldChange: PropTypes.func.isRequired,

Expand Down Expand Up @@ -47,7 +51,7 @@ const defaultProps = {
const AddressForm = props => (
<>
<AddressSearch
label={props.translate('common.personalAddress')}
label={props.translate(props.streetTranslationKey)}
containerStyles={[styles.mt4]}
value={props.values.street}
onChange={props.onFieldChange}
Expand Down
1 change: 1 addition & 0 deletions src/pages/ReimbursementAccount/CompanyStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class CompanyStep extends React.Component {
errorText={this.getErrorText('companyName')}
/>
<AddressForm
streetTranslationKey="common.companyAddress"
values={{
street: this.state.addressStreet,
city: this.state.addressCity,
Expand Down
1 change: 1 addition & 0 deletions src/pages/ReimbursementAccount/IdentityForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const IdentityForm = (props) => {
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.SSN}
/>
<AddressForm
streetTranslationKey="common.personalAddress"
values={props.values}
errors={props.errors}
onFieldChange={props.onFieldChange}
Expand Down