mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: Update i18next-browser-languagedetector (#4196)
This commit is contained in:
parent
2b29b9a96d
commit
4bfc5bbcaa
3 changed files with 17 additions and 7 deletions
|
@ -273,7 +273,10 @@ const PlusLinkJSX = (
|
|||
|
||||
const ExcalidrawWrapper = () => {
|
||||
const [errorMessage, setErrorMessage] = useState("");
|
||||
const currentLangCode = languageDetector.detect() || defaultLang.code;
|
||||
let currentLangCode = languageDetector.detect() || defaultLang.code;
|
||||
if (Array.isArray(currentLangCode)) {
|
||||
currentLangCode = currentLangCode[0];
|
||||
}
|
||||
const [langCode, setLangCode] = useState(currentLangCode);
|
||||
|
||||
// initial state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue