diff --git a/src/components/common/header/index.tsx b/src/components/common/header/index.tsx index 9b9a5bf..467e7cf 100644 --- a/src/components/common/header/index.tsx +++ b/src/components/common/header/index.tsx @@ -21,7 +21,14 @@ const HeaderMobile = React.forwardRef< >(({ className, ...props }, ref) => { const router = useRouter() - const isActive = (href: string) => router.pathname === href + const isActive = (href: string) => { + const slug = router.query.slug as string + if (slug) { + return router.pathname.replace('/[slug]', '') === href + } else { + return router.pathname === href + } + } return (