mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
perf(language-settings): make locale change handling async with await
This commit is contained in:
parent
f2d14d07b2
commit
f40a8d3821
@ -29,9 +29,9 @@ export function LanguageSettings() {
|
|||||||
return options.sort((a, b) => a.value.localeCompare(b.value));
|
return options.sort((a, b) => a.value.localeCompare(b.value));
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|
||||||
const handleValueChange = (value: Locale) => {
|
const handleValueChange = async (value: Locale) => {
|
||||||
setSelectedOption(value);
|
setSelectedOption(value);
|
||||||
setUserLocale(value);
|
await setUserLocale(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getIconForLocale = (locale: Locale) => {
|
const getIconForLocale = (locale: Locale) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user