/* eslint-disable react/prop-types */ import { FaTrash } from 'react-icons/fa'; interface ChatSession { id: string; title: string; createdAt: number; } interface ChatHistoryListProps { sessions: ChatSession[]; onSessionSelect: (sessionId: string) => void; onSessionDelete: (sessionId: string) => void; visible: boolean; isDarkMode?: boolean; } const ChatHistoryList: React.FC = ({ sessions, onSessionSelect, onSessionDelete, visible, isDarkMode = false, }) => { if (!visible) return null; const formatDate = (timestamp: number) => { const date = new Date(timestamp); return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' }); }; return (

Chat History

{sessions.length === 0 ? (
No chat history available
) : (
{sessions.map(session => (
))}
)}
); }; export default ChatHistoryList;