We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3826bd commit f2d9e88Copy full SHA for f2d9e88
src/components/SideNav.astro
@@ -11,7 +11,7 @@ type MenuItem = {
11
const menuItems: MenuItem[] = [
12
{
13
name: 'Home',
14
- pathname: '',
+ pathname: '/',
15
icon: House,
16
},
17
src/components/SideNavItem.astro
@@ -8,7 +8,7 @@ interface Props {
8
9
const {pathname, label, icon} = Astro.props;
10
-const active = pathname === Astro.url.pathname.replace(/\/+$/, '');
+const active = pathname === (Astro.url.pathname.replace(/\/+$/, '') || "/");
---
<a href={pathname} class=`p-3 flex flex-row items-center gap-3 cursor-pointer rounded-full text-bright select-none transition-all
0 commit comments