{t("setting.system-section.additional-style")}
diff --git a/web/src/i18n.ts b/web/src/i18n.ts
index 41873cf23..5430836a5 100644
--- a/web/src/i18n.ts
+++ b/web/src/i18n.ts
@@ -52,7 +52,7 @@ i18n.use(initReactI18next).init({
translation: hantLocale,
},
},
- lng: "nl",
+ lng: "en",
fallbackLng: "en",
});
diff --git a/web/src/router/index.tsx b/web/src/router/index.tsx
index b9748c836..36a4e795a 100644
--- a/web/src/router/index.tsx
+++ b/web/src/router/index.tsx
@@ -11,16 +11,28 @@ const MemoDetail = lazy(() => import("../pages/MemoDetail"));
const EmbedMemo = lazy(() => import("../pages/EmbedMemo"));
const NotFound = lazy(() => import("../pages/NotFound"));
+const initialGlobalStateLoader = (() => {
+ let done = false;
+
+ return async () => {
+ if (done) {
+ return;
+ }
+ done = true;
+ try {
+ await initialGlobalState();
+ } catch (error) {
+ // do nth
+ }
+ };
+})();
+
const router = createBrowserRouter([
{
path: "/auth",
element:
,
loader: async () => {
- try {
- await initialGlobalState();
- } catch (error) {
- // do nth
- }
+ await initialGlobalStateLoader();
return null;
},
},
@@ -28,8 +40,9 @@ const router = createBrowserRouter([
path: "/",
element:
,
loader: async () => {
+ await initialGlobalStateLoader();
+
try {
- await initialGlobalState();
await initialUserState();
} catch (error) {
// do nth
@@ -48,8 +61,9 @@ const router = createBrowserRouter([
path: "/u/:userId",
element:
,
loader: async () => {
+ await initialGlobalStateLoader();
+
try {
- await initialGlobalState();
await initialUserState();
} catch (error) {
// do nth
@@ -66,8 +80,9 @@ const router = createBrowserRouter([
path: "/explore",
element:
,
loader: async () => {
+ await initialGlobalStateLoader();
+
try {
- await initialGlobalState();
await initialUserState();
} catch (error) {
// do nth
@@ -84,8 +99,9 @@ const router = createBrowserRouter([
path: "/m/:memoId",
element:
,
loader: async () => {
+ await initialGlobalStateLoader();
+
try {
- await initialGlobalState();
await initialUserState();
} catch (error) {
// do nth
@@ -102,8 +118,9 @@ const router = createBrowserRouter([
path: "/m/:memoId/embed",
element:
,
loader: async () => {
+ await initialGlobalStateLoader();
+
try {
- await initialGlobalState();
await initialUserState();
} catch (error) {
// do nth
@@ -115,11 +132,7 @@ const router = createBrowserRouter([
path: "*",
element:
,
loader: async () => {
- try {
- await initialGlobalState();
- } catch (error) {
- // do nth
- }
+ await initialGlobalStateLoader();
return null;
},
},