Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

fix header link highlight for nested api ref routes

0divd8cd167cfcbc
diff --git a/apps/web/src/components/Header.tsx b/apps/web/src/components/Header.tsx
index 982c35325..8d4dfd006 100644
--- a/apps/web/src/components/Header.tsx
+++ b/apps/web/src/components/Header.tsx
@@ -35,7 +35,7 @@ function DocumentationTypeLink({
'hover:text-white hover:cursor-pointer text-sm font-medium px-2 py-1 rounded-md',
pathname.startsWith(href) &&
// XXX: this is a hack to avoid the /docs and /docs/api-reference links being highlighted at the same time
- !(href === '/docs' && pathname === '/docs/api-reference')
+ !(href === '/docs' && pathname.startsWith('/docs/api-reference'))
? 'text-white bg-zinc-800'
: 'text-neutral-400'
)}