From 5cebd66159b2eb5dca10048aea5ecfb753f7f39d Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 28 Sep 2023 14:34:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=B1=20WIP=20on=20localstorage=20backen?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/board/index.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/pages/board/index.tsx b/src/pages/board/index.tsx index 2fe8ee1f0..3736c31dc 100644 --- a/src/pages/board/index.tsx +++ b/src/pages/board/index.tsx @@ -1,6 +1,5 @@ import { GetServerSideProps, InferGetServerSidePropsType } from 'next'; -import { SSRConfig, useTranslation } from 'next-i18next'; -import { useEffect } from 'react'; +import { SSRConfig } from 'next-i18next'; import { Dashboard } from '~/components/Dashboard/Dashboard'; import { BoardLayout } from '~/components/layout/Templates/BoardLayout'; import { useInitConfig } from '~/config/init'; @@ -16,16 +15,6 @@ export default function BoardPage({ config: initialConfig, dockerEnabled, }: InferGetServerSidePropsType) { - const { t, i18n } = useTranslation(boardNamespaces, { - bindI18n: 'languageChanged loaded', - }); - // bindI18n: loaded is needed because of the reloadResources call - // if all pages use the reloadResources mechanism, the bindI18n option can also be defined in next-i18next.config.js - useEffect(() => { - if (i18n.language !== i18n.resolvedLanguage) { - i18n.reloadResources(i18n.resolvedLanguage, boardNamespaces); - } - }, []); useInitConfig(initialConfig); return ( @@ -65,7 +54,7 @@ export const getServerSideProps: GetServerSideProps = a primaryColor: config.settings.customization.colors.primary, secondaryColor: config.settings.customization.colors.secondary, primaryShade: config.settings.customization.colors.shade, - }, + } }; }