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

No chat history

) : (

{' '} to save chat history.

)}
)}
) }