Openstatus www.openstatus.dev

fix: active pathname (#1358)

authored by

Maximilian Kaske and committed by
GitHub
3bed2de4 b66b3df4

+3 -3
+3 -3
apps/status-page/src/components/nav/header.tsx
··· 26 26 return [ 27 27 { 28 28 label: "Status", 29 - href: `${prefix ? `/${prefix}` : ""}`, 29 + href: `/${prefix}`, 30 30 isActive: pathname === `/${prefix}`, 31 31 }, 32 32 { 33 33 label: "Events", 34 34 href: `${prefix ? `/${prefix}` : ""}/events`, 35 - isActive: pathname.startsWith(`/${prefix}/events`), 35 + isActive: pathname.startsWith(`${prefix ? `/${prefix}` : ""}/events`), 36 36 }, 37 37 { 38 38 label: "Monitors", 39 39 href: `${prefix ? `/${prefix}` : ""}/monitors`, 40 - isActive: pathname.startsWith(`/${prefix}/monitors`), 40 + isActive: pathname.startsWith(`${prefix ? `/${prefix}` : ""}/monitors`), 41 41 }, 42 42 ]; 43 43 }