From a99117a364f771503f874208bf44efed6f21d039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20Deniz=20KIVRAK?= Date: Sun, 1 Oct 2023 18:05:02 +0300 Subject: [PATCH] fix i18n watcher and window global (#12) --- index.html | 3 +++ package.json | 2 +- src/features/i18n/components/LangMenu/LangMenu.tsx | 2 -- src/features/ui/components/Layout/Copyright/Copyright.tsx | 2 +- src/features/ui/components/Layout/Layout.tsx | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 6100e38..7c55ec5 100644 --- a/index.html +++ b/index.html @@ -82,6 +82,9 @@ } } + diff --git a/package.json b/package.json index c1d10e9..46a3008 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vitedapp", "private": true, - "version": "0.3.0", + "version": "0.3.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src/features/i18n/components/LangMenu/LangMenu.tsx b/src/features/i18n/components/LangMenu/LangMenu.tsx index 786c585..5174393 100644 --- a/src/features/i18n/components/LangMenu/LangMenu.tsx +++ b/src/features/i18n/components/LangMenu/LangMenu.tsx @@ -6,7 +6,6 @@ import { useLocation } from 'react-router-dom'; import { i18nConfig } from '../../config'; import { useChangeLanguage } from '../../useChangeLanguage'; -import { useI18nWatcher } from '../../useI18nWatchers'; const LangModal = React.lazy(() => import(/* webpackChunkName: "LangModal" */ './LangModal').then(module => ({ @@ -17,7 +16,6 @@ const LangModal = React.lazy(() => export const LangMenu: React.FC = () => { const location = useLocation(); const { i18n } = useTranslation('Layout'); - useI18nWatcher(); const { changeLanguage } = useChangeLanguage( location.pathname, i18n.resolvedLanguage ?? i18nConfig.fallbackLang.code diff --git a/src/features/ui/components/Layout/Copyright/Copyright.tsx b/src/features/ui/components/Layout/Copyright/Copyright.tsx index 5cc84db..a589dbe 100644 --- a/src/features/ui/components/Layout/Copyright/Copyright.tsx +++ b/src/features/ui/components/Layout/Copyright/Copyright.tsx @@ -8,7 +8,7 @@ import reactDappTemplateLogo from '../../../assets/images/react-dapp-template-lo export const Copyright: React.FC = React.memo(() => { return ( - +