"use client"; import * as React from "react"; import { LayoutDashboard, Plus, Layers, Package, MapPin, } from "lucide-react"; import { NavUser } from "@/components/nav-user"; import { ROUTES } from "@/utils/routes"; import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarGroup, SidebarGroupLabel, } from "@/components/ui/sidebar"; import Link from "next/link"; import { usePathname } from "next/navigation"; // This is the navigation data const data = { user: { name: "shadcn", email: "m@example.com", avatar: "/avatars/shadcn.jpg", }, navMain: [ { title: "Dashboard", url: ROUTES.DASHBOARD, icon: LayoutDashboard, }, { title: "New Analysis", url: ROUTES.NEW_ANALYSIS, icon: Plus, }, { title: "Project", url: ROUTES.PROJECT, icon: Layers, }, { title: "Package", url: ROUTES.PACKAGE, icon: Package, }, { title: "Location", url: ROUTES.LOCATION, icon: MapPin, }, ], }; export function AppSidebar({ ...props }: React.ComponentProps) { const pathname = usePathname(); return (
Vision Road Analytics Platform
{data.navMain.map((item) => ( {item.icon && } {item.title} ))}
); }