Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(ui): docs menu item should open in new tab (#4980)

Marc Klingen9ad2ef1f9186
diff --git a/web/src/components/nav-main.tsx b/web/src/components/nav-main.tsx
index 26ecf0c63c..0cc8cd9143 100644
--- a/web/src/components/nav-main.tsx
+++ b/web/src/components/nav-main.tsx
@@ -28,10 +28,12 @@ export type NavMainItem = {
icon?: LucideIcon;
isActive?: boolean;
label?: string | ReactNode;
+ newTab?: boolean;
items?: {
title: string;
url: string;
isActive?: boolean;
+ newTab?: boolean;
}[];
};
@@ -111,7 +113,10 @@ export function NavMain({
asChild
isActive={subItem.isActive}
>
- <Link href={subItem.url}>
+ <Link
+ href={subItem.url}
+ target={subItem.newTab ? "_blank" : undefined}
+ >
<span>{subItem.title}</span>
</Link>
</SidebarMenuSubButton>
@@ -128,7 +133,10 @@ export function NavMain({
tooltip={item.title}
isActive={item.isActive}
>
- <Link href={item.url}>
+ <Link
+ href={item.url}
+ target={item.newTab ? "blank" : undefined}
+ >
<NavItemContent item={item} />
</Link>
</SidebarMenuButton>