import { getChats, removeChat, shareChat } from '@/app/actions' import { SidebarActions } from '@/components/sidebar-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 => chat && ( ) )}
) : (

No chat history

)}
) }