import Filters, { FilterValues } from '../../components/Filters'; import { FC, ReactNode, useState } from 'react' import { useTranslation } from 'react-i18next' import Table from '../../components/Table'; import { ColumnType } from '../../components/types/TableTypes'; import { InfoCircle, More, Refresh2 } from 'iconsax-react'; interface Message extends Record { id: string; title: string | ReactNode; sender: string; date: string; read: boolean; } const List: FC = () => { const { t } = useTranslation(); const [isLoading] = useState(false); const messageData: Message[] = [ { id: '1', title:
پیش نویس
, sender: 'علی محمدی', date: '1402/05/12', read: true }, { id: '2', title:
پیش نویس
, sender: 'زهرا احمدی', date: '1402/05/13', read: true }, { id: '3', title:
پیش نویس
, sender: 'مدیریت', date: '1402/05/14', read: true }, ]; const columns: ColumnType[] = [ { key: 'title', title: 'عنوان پیام', render: (item) => (
{!item.read &&
} {item.title}
) }, { key: 'sender', title: 'فرستنده' }, { key: 'date', title: 'تاریخ', align: 'center' }, ]; const tableActions = (
); const handleFilterChange = (newFilters: FilterValues) => { console.log('Applied filters:', newFilters); }; return (

{t('draft.title')}

columns={columns} data={messageData} isLoading={isLoading} showHeader={false} actions={tableActions} onRowClick={(id) => console.log(`کلیک روی پیام با شناسه ${id}`)} noDataMessage={
هیچ پیامی یافت نشد
} selectable={true} />
) } export default List