'use client'; import { useState, useEffect } from 'react'; import { PageLayout, DataTable, StatusBadge, EmptyState } from '@/components/ui'; export default function ApplicationsPage() { const [apps, setApps] = useState([] as any[]); const [loading, setLoading] = useState(true); useEffect(() => { setLoading(true); fetch('/api/v1/cert-applications').then(r => r.json()).then(d => { setApps(d.items || []); setLoading(false); }); }, []); return ( <> {loading &&
⏳ Загрузка...
} {apps.length > 0 ? ( ( )}, { key: 'submitted_at', label: 'Дата', render: (v: string) => v ? new Date(v).toLocaleDateString('ru-RU') : '—' }, ]} data={apps} /> ) : } ); }