'use client'; import Link from 'next/link'; import { useParams } from 'next/navigation'; import { cn } from '@/lib/utils'; import { ChatEntity } from '@/lib/types'; import Image from 'next/image'; export interface ChatCardProps { chat: ChatEntity; } const ChatCard: React.FC = ({ chat }) => { const { chatId: chatIdFromParam } = useParams(); const { id, url, messages, user } = chat; return (
{url}

{messages?.[0].content.slice(0, 50) + ' ...' ?? 'new chat'}

); }; export default ChatCard;