diff options
author | Jamie Guthrie <jamie.guthrie@gmail.com> | 2023-08-19 23:26:59 +0200 |
---|---|---|
committer | Jamie Guthrie <jamie.guthrie@gmail.com> | 2023-08-19 23:26:59 +0200 |
commit | 92dfd50188886beb3f6498ce019cd380795fc126 (patch) | |
tree | bb74fea24fd9a8ff37a9e680a8808d9db3bb96ed /modern/src/login | |
parent | c2402bac156703bc5d80fd6c166cafefcb435b1a (diff) | |
download | trackermap-web-92dfd50188886beb3f6498ce019cd380795fc126.tar.gz trackermap-web-92dfd50188886beb3f6498ce019cd380795fc126.tar.bz2 trackermap-web-92dfd50188886beb3f6498ce019cd380795fc126.zip |
Switch countryCode to country & refactor method
Diffstat (limited to 'modern/src/login')
-rw-r--r-- | modern/src/login/LoginPage.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/login/LoginPage.jsx b/modern/src/login/LoginPage.jsx index 3ccb954f..94321298 100644 --- a/modern/src/login/LoginPage.jsx +++ b/modern/src/login/LoginPage.jsx @@ -50,7 +50,7 @@ const LoginPage = () => { const t = useTranslation(); const { languages, language, setLanguage } = useLocalization(); - const languageList = Object.entries(languages).map((values) => ({ code: values[0], countryCode: values[1].countryCode, name: values[1].name })); + const languageList = Object.entries(languages).map((values) => ({ code: values[0], country: values[1].country, name: values[1].name })); const [failed, setFailed] = useState(false); @@ -211,7 +211,7 @@ const LoginPage = () => { <Select label={t('loginLanguage')} value={language} onChange={(e) => setLanguage(e.target.value)}> {languageList.map((it) => ( <MenuItem key={it.code} value={it.code}> - {getFlagEmoji(it.countryCode)} + {getFlagEmoji(it.country)} {it.name} </MenuItem> |