mirror of
https://github.com/massbug/judge4c.git
synced 2026-10-15 06:47:19 +00:00
perf(language-settings): make locale change handling async with await
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user