diff --git a/web/src/components/Sidebar.tsx b/web/src/components/Sidebar.tsx index 8ae65b0..2d21bf4 100644 --- a/web/src/components/Sidebar.tsx +++ b/web/src/components/Sidebar.tsx @@ -1,9 +1,10 @@ "use client"; import { usePathname } from "next/navigation"; -import { House, Search, Settings, Sparkles, FolderKanban, ShieldCheck, MessageCircle, Brain } from "lucide-react"; +import { Sparkles } from "lucide-react"; import { PRODUCT_NAME } from "@/lib/product-config"; import { isFeatureEnabled } from "@/lib/feature-flags"; +import { NOTELETT_NAV_ITEMS } from "@/lib/navigation"; import { AppShellNav, AppShellNavItem, @@ -12,17 +13,6 @@ import { Panel, } from "@/components/ui/Primitives"; -const navItems: { href: string; label: string; icon: typeof House; flag?: string }[] = [ - { href: "/dashboard", label: "Dashboard", icon: House }, - { href: "/workspaces", label: "Workspaces", icon: FolderKanban }, - { href: "/reviews", label: "Reviews", icon: ShieldCheck, flag: "mcp_tools_enabled" }, - { href: "/prompts", label: "Prompts", icon: Sparkles }, - { href: "/search", label: "Search", icon: Search }, - { href: "/chat", label: "Workspace chat", icon: MessageCircle }, - { href: "/palace", label: "Palace", icon: Brain }, - { href: "/settings", label: "Settings", icon: Settings }, -]; - export function Sidebar({ open }: { open?: boolean }) { const pathname = usePathname() ?? ""; @@ -43,7 +33,7 @@ export function Sidebar({ open }: { open?: boolean }) { - {navItems.filter((item) => !item.flag || isFeatureEnabled(item.flag)).map((item) => { + {NOTELETT_NAV_ITEMS.filter((item) => !item.flag || isFeatureEnabled(item.flag)).map((item) => { const Icon = item.icon; const active = pathname === item.href || pathname.startsWith(`${item.href}/`); return ( diff --git a/web/src/lib/navigation.ts b/web/src/lib/navigation.ts new file mode 100644 index 0000000..3a4dcd7 --- /dev/null +++ b/web/src/lib/navigation.ts @@ -0,0 +1,21 @@ +import type { LucideIcon } from "lucide-react"; +import { Brain, FolderKanban, House, MessageCircle, Search, Settings, ShieldCheck, Sparkles } from "lucide-react"; + +export type NoteLettNavItem = { + href: string; + label: string; + icon: LucideIcon; + flag?: string; +}; + +export const NOTELETT_NAV_ITEMS: NoteLettNavItem[] = [ + { href: "/dashboard", label: "Dashboard", icon: House }, + { href: "/workspaces", label: "Workspaces", icon: FolderKanban }, + { href: "/reviews", label: "Reviews", icon: ShieldCheck, flag: "mcp_tools_enabled" }, + { href: "/prompts", label: "Prompts", icon: Sparkles }, + { href: "/search", label: "Search", icon: Search }, + { href: "/chat", label: "Workspace chat", icon: MessageCircle }, + { href: "/palace", label: "Palace", icon: Brain }, + { href: "/settings", label: "Settings", icon: Settings }, +]; +