'use client';
import { PageLayout, DataTable, StatusBadge } from '@/components/ui';
import { useNotifications } from '@/hooks/useNotifications';
export default function NotificationCenter() {
const { notifications, markRead, markAllRead } = useNotifications();
return (
Все уведомления ({notifications.length})
{n.created_at ? new Date(n.created_at).toLocaleString('ru-RU') : '—'} },
{ key: 'message', header: 'Сообщение', render: (n: any) => {n.message || n.title} },
{ key: 'notification_type', header: 'Тип', render: (n: any) => },
{ key: 'actions', header: '', render: (n: any) => !n.is_read ? : ✓ },
]}
onRowClick={(n: any) => !n.is_read && markRead(n.id)} />
);
}