diff --git a/package.json b/package.json
index 6215c0a5..1c93e5ec 100644
--- a/package.json
+++ b/package.json
@@ -86,7 +86,7 @@
"test": "npm run test:app",
"test:all": "npm run test:typecheck && npm run test:code && npm run test:other && npm run test:app -- --watchAll=false",
"test:update": "npm run test:app -- --updateSnapshot --watchAll=false",
- "test:app": "react-scripts test --env=jsdom --passWithNoTests",
+ "test:app": "react-scripts test --env=jsdom-fourteen --passWithNoTests",
"test:code": "eslint --max-warnings=0 --ignore-path .gitignore --ext .js,.ts,.tsx .",
"test:debug": "react-scripts --inspect-brk test --runInBand --no-cache",
"test:other": "npm run prettier -- --list-different",
diff --git a/src/components/InitializeApp.tsx b/src/components/InitializeApp.tsx
new file mode 100644
index 00000000..091f726d
--- /dev/null
+++ b/src/components/InitializeApp.tsx
@@ -0,0 +1,24 @@
+import React from "react";
+
+import { LoadingMessage } from "./LoadingMessage";
+import { setLanguageFirstTime } from "../i18n";
+
+export class InitializeApp extends React.Component<
+ any,
+ { isLoading: boolean }
+> {
+ public state: { isLoading: boolean } = {
+ isLoading: true,
+ };
+
+ async componentDidMount() {
+ await setLanguageFirstTime();
+ this.setState({
+ isLoading: false,
+ });
+ }
+
+ public render() {
+ return this.state.isLoading ? : this.props.children;
+ }
+}
diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx
index 57e0fc34..9f52b919 100644
--- a/src/components/LayerUI.tsx
+++ b/src/components/LayerUI.tsx
@@ -255,8 +255,8 @@ const LayerUI = ({
}`}
>
{
- setLanguage(lng);
+ onChange={async (lng) => {
+ await setLanguage(lng);
setAppState({});
}}
languages={languages}
diff --git a/src/components/MobileMenu.tsx b/src/components/MobileMenu.tsx
index dbd7f672..d2f5347a 100644
--- a/src/components/MobileMenu.tsx
+++ b/src/components/MobileMenu.tsx
@@ -100,8 +100,8 @@ export const MobileMenu = ({