"use client" import { cn } from "@/lib/utils" import { usePathname } from "next/navigation" import { ComponentProps } from "react" import { SidebarMenuItem } from "../ui/sidebar" export function SidebarMenuItemWithHighlight({ href, children, className, ...props }: { href: string } & ComponentProps) { const pathname = usePathname() let isActive = false if (href === "/") { isActive = pathname === href } else { isActive = pathname.startsWith(href) } return ( {children} ) } // bg-primary text-primary-foreground