From 6fb03f2eb28a1d6bb158f34e9b9fb03ec92cbbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Alan=20Guti=C3=A9rrez=20Cruz?= <33694882+jagcruz@users.noreply.github.com> Date: Sat, 13 Jul 2024 18:05:51 -0300 Subject: [PATCH] fix: :bug: update active class logic in `Navbar` component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: FĂ©lix Icaza --- src/components/Navbar/Navbar.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navbar/Navbar.astro b/src/components/Navbar/Navbar.astro index 5b09d9f..bd1ad09 100644 --- a/src/components/Navbar/Navbar.astro +++ b/src/components/Navbar/Navbar.astro @@ -25,7 +25,7 @@ function isActiveSlug(slug: string) { return ( normalizedPath === normalizedSlug || - (normalizedPath === BASE_URL && normalizedSlug === '/') || + normalizedSlug === '/' || (normalizedSlug !== '/' && normalizedPath.startsWith(normalizedSlug)) ); }