Auth: Polish UI, fix exception

This commit is contained in:
Alexander Zinchuk 2022-03-05 18:06:20 +01:00
parent e81475c21a
commit 233979405a
3 changed files with 5 additions and 4 deletions

View File

@ -109,7 +109,7 @@ const AuthCode: FC<StateProps> = ({
onInput={onCodeChange}
value={code}
error={authError && lang(authError)}
autoComplete="one-time-code"
autoComplete="off"
inputMode="numeric"
/>
{authIsLoading && <Loading />}

View File

@ -63,7 +63,7 @@
.country-flag {
font-size: 2rem;
margin-right: 2rem;
margin-right: 1rem;
.emoji {
width: 2rem;
@ -85,5 +85,6 @@
.country-code {
margin-left: auto;
opacity: 0.5;
padding-right: 0.25rem;
}
}

View File

@ -136,13 +136,13 @@ const CountryCodeInput: FC<OwnProps & StateProps> = ({
{filteredList
.map((country: ApiCountryCode) => (
<MenuItem
key={country.iso2}
key={`${country.iso2}-${country.countryCode}`}
className={value && country.iso2 === value.iso2 ? 'selected' : ''}
onClick={() => handleChange(country)}
>
<span className="country-flag">{renderText(isoToEmoji(country.iso2), ['hq_emoji'])}</span>
<span className="country-name">{country.name || country.defaultName}</span>
<span className="country-code">{country.countryCode}</span>
<span className="country-code">+{country.countryCode}</span>
</MenuItem>
))}
{!filteredList.length && (