import { getChats, removeChat } from '@/app/actions' import { SidebarItem } from '@/components/sidebar-item' export interface SidebarListProps { userId?: string } export async function SidebarList({ userId }: SidebarListProps) { const chats = await getChats(userId) return (
{chats?.length ? (
{chats.map(chat => ( ))}
) : (

No chat history

)}
) }