"use client"; import * as React from "react"; import { NavMain } from "@/components/nav-main"; import { Sidebar, SidebarContent, SidebarRail } from "@/components/ui/sidebar"; import { TerminalIcon, TerminalSquareIcon, BookOpenIcon, PieChartIcon, } from "lucide-react"; import { usePathname } from "next/navigation"; export function AppSidebar({ ...props }: React.ComponentProps) { const checkActive = (url: string) => { // /dashboard const pathname = usePathname(); return pathname === url; }; // Dashboard // Write (Blogs) // SSH // Scripts const items = [ { title: "Dashboard", url: "/dashboard", icon: , isActive: checkActive("/dashboard"), }, { title: "Write", url: "/write", icon: , isActive: checkActive("/write"), }, { title: "SSH", url: "/ssh", icon: , isActive: checkActive("/ssh"), }, { title: "Scripts", url: "/scripts", icon: , isActive: checkActive("/scripts"), }, ]; return ( ); }