'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { type Chat } from '@/lib/types' import { cn } from '@/lib/utils' import { buttonVariants } from '@/components/ui/button' import { IconMessage } from '@/components/ui/icons' import { SidebarActions } from '@/components/sidebar-actions' interface SidebarItemProps { chat: Chat children: React.ReactNode } export function SidebarItem({ chat, children }: SidebarItemProps) { const pathname = usePathname() const isActive = pathname === chat.path if (!chat?.id) return null return ( <>
{chat.title}
{children} ) }