Skip to content

Commit

Permalink
fix: add new entry for another US label (#1244)
Browse files Browse the repository at this point in the history
Add new entry for for another US label which is United States
  • Loading branch information
ahtesham-quraish authored May 3, 2024
1 parent 73e8913 commit 8efb225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const CountryField = (props) => {
};

const getCountryList = () => countryList.map((country) => (
<FormAutosuggestOption key={country[COUNTRY_CODE_KEY]} id={country[COUNTRY_CODE_KEY]}>
<FormAutosuggestOption key={country[COUNTRY_DISPLAY_KEY]} id={country[COUNTRY_CODE_KEY]}>
{country[COUNTRY_DISPLAY_KEY]}
</FormAutosuggestOption>
));
Expand Down
6 changes: 5 additions & 1 deletion src/register/components/ConfigurableRegistrationForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ const ConfigurableRegistrationForm = (props) => {
autoSubmitRegistrationForm,
} = props;

const countryList = useMemo(() => getCountryList(getLocale()), []);
/** The reason for adding the entry 'United States' is that Chrome browser aut-fill the form with the 'Unites
States' instead of 'United States of America' which does not exist in country dropdown list and gets the user
confused and unable to create an account. So we added the United States entry in the dropdown list.
*/
const countryList = useMemo(() => getCountryList(getLocale()).concat([{ code: 'US', name: 'United States' }]), []);

let showTermsOfServiceAndHonorCode = false;
let showCountryField = false;
Expand Down

0 comments on commit 8efb225

Please sign in to comment.