From bfbdb971ddfa5c89fb25ee8b305ae70fcf38ddea Mon Sep 17 00:00:00 2001 From: vennilamahalingam <33494788+vennilamahalingam@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:56:54 +0530 Subject: [PATCH] To fix the navbar highlight. https://github.com/jaredpalmer/formik/issues/3854 --- website/src/pages/docs/[...slug].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/docs/[...slug].tsx b/website/src/pages/docs/[...slug].tsx index 314b5f7d2..2394029a2 100644 --- a/website/src/pages/docs/[...slug].tsx +++ b/website/src/pages/docs/[...slug].tsx @@ -223,7 +223,7 @@ function SidebarRoutes({ const href = '/docs/[...slug]'; const pagePath = removeFromLast(path!, '.'); const pathname = addTagToSlug(pagePath, tag); - const selected = slug.startsWith(pagePath); + const selected = (slug === pagePath); const route = { href, path, title, pathname, selected }; return (