From 2b8b87c27b2d74fcddb4b0139ee1b4aa004d47bc Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 31 Jan 2023 23:54:44 -0800 Subject: [PATCH] Fix locale not persisting going to static pages --- components/Header/index.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/components/Header/index.tsx b/components/Header/index.tsx index 2a9adfe5..68e084be 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -42,6 +42,8 @@ const Header = () => { // Router const router = useRouter() + const locale = + router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en' // State management const [copyToastOpen, setCopyToastOpen] = useState(false) @@ -469,17 +471,23 @@ const Header = () => { - + {t('about.segmented_control.about')} - + {t('about.segmented_control.updates')} - + {t('about.segmented_control.roadmap')}