From c42d5eae276bd4de984ce9777f8e903b2ce5df36 Mon Sep 17 00:00:00 2001 From: smanylov Date: Wed, 17 Dec 2025 09:18:18 +0700 Subject: [PATCH] fix page highlight --- src/app/ui/nav-link-dropdown.tsx | 4 +++- src/app/ui/nav-links.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/ui/nav-link-dropdown.tsx b/src/app/ui/nav-link-dropdown.tsx index 53008cc..70cc2e5 100644 --- a/src/app/ui/nav-link-dropdown.tsx +++ b/src/app/ui/nav-link-dropdown.tsx @@ -6,7 +6,9 @@ import { usePathname } from 'next/navigation'; import { useTranslations } from 'next-intl'; export default function DropDownList() { - const pathname = usePathname(); + const pathname = usePathname().replace('/en/', '/').replace('/ru/', '/'); + console.log('pathname'); + console.log(pathname); const [dropDownExpanded, setDropDownExpanded] = useState(false); const t = useTranslations('Global'); diff --git a/src/app/ui/nav-links.tsx b/src/app/ui/nav-links.tsx index 4d7aebe..09163e3 100644 --- a/src/app/ui/nav-links.tsx +++ b/src/app/ui/nav-links.tsx @@ -10,7 +10,7 @@ import { logout } from '@/app/actions/auth'; import { useTranslations } from 'next-intl'; export default function NavLinks() { - const pathname = usePathname(); + const pathname = usePathname().replace('/en/', '/').replace('/ru/', '/'); const t = useTranslations('Global'); const links = [