From cc20060090e9ca96c7ce5fecbabca2ebbd837827 Mon Sep 17 00:00:00 2001 From: maceteligolden Date: Tue, 26 Dec 2023 14:41:27 +0100 Subject: [PATCH] update:get curernt locale --- apps/web/app/[locale]/kanban/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/app/[locale]/kanban/page.tsx b/apps/web/app/[locale]/kanban/page.tsx index 69c86d728..134caf108 100644 --- a/apps/web/app/[locale]/kanban/page.tsx +++ b/apps/web/app/[locale]/kanban/page.tsx @@ -14,17 +14,19 @@ import { MainLayout } from 'lib/layout'; import Image from 'next/image'; import { useState } from 'react'; import { useTranslations } from 'next-intl'; +import { useParams } from 'next/navigation'; const Kanban = () => { const { data } = useKanban(); const { activeTeam } = useOrganizationTeams(); const t = useTranslations(); - const { locale } = useParams<{locale: string}>(); + const params = useParams<{locale: string}>(); + const currentLocale = params ? params.locale : null; const [activeTab, setActiveTab] = useState(KanbanTabs.TODAY); - const breadcrumbPath = [{title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/'}, {title: activeTeam?.name || '', href:'/'}, {title:'Kanban Board', href: `/${locale}/kanban`}]; + const breadcrumbPath = [{title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/'}, {title: activeTeam?.name || '', href:'/'}, {title:'Kanban Board', href: `/${currentLocale}/kanban`}]; const imageRadius = 20; const numberOfImagesDisplayed = 4;