Skip to content

Open-source status page, incident response and uptime monitoring

fix: active pathname (#1358)

Maximilian Kaske3bed2de437fc
diff --git a/apps/status-page/src/components/nav/header.tsx b/apps/status-page/src/components/nav/header.tsx
index 6702090d9..cb89b79b8 100644
--- a/apps/status-page/src/components/nav/header.tsx
+++ b/apps/status-page/src/components/nav/header.tsx
@@ -26,18 +26,18 @@ function useNav() {
return [
{
label: "Status",
- href: `${prefix ? `/${prefix}` : ""}`,
+ href: `/${prefix}`,
isActive: pathname === `/${prefix}`,
},
{
label: "Events",
href: `${prefix ? `/${prefix}` : ""}/events`,
- isActive: pathname.startsWith(`/${prefix}/events`),
+ isActive: pathname.startsWith(`${prefix ? `/${prefix}` : ""}/events`),
},
{
label: "Monitors",
href: `${prefix ? `/${prefix}` : ""}/monitors`,
- isActive: pathname.startsWith(`/${prefix}/monitors`),
+ isActive: pathname.startsWith(`${prefix ? `/${prefix}` : ""}/monitors`),
},
];
}