mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: delay loading until language imported (#5344)
This commit is contained in:
parent
d34c2a75db
commit
39d17c4a3c
1 changed files with 1 additions and 1 deletions
|
@ -14,11 +14,11 @@ export const InitializeApp = (props: Props) => {
|
|||
useEffect(() => {
|
||||
const updateLang = async () => {
|
||||
await setLanguage(currentLang);
|
||||
setLoading(false);
|
||||
};
|
||||
const currentLang =
|
||||
languages.find((lang) => lang.code === props.langCode) || defaultLang;
|
||||
updateLang();
|
||||
setLoading(false);
|
||||
}, [props.langCode]);
|
||||
|
||||
return loading ? <LoadingMessage /> : props.children;
|
||||
|
|
Loading…
Add table
Reference in a new issue