import { SectionHeader } from '@cameleer/design-system'; import { PageLoader } from '../../components/PageLoader'; import { useAlerts } from '../../api/queries/alerts'; import { AlertRow } from './AlertRow'; import css from './alerts-page.module.css'; export default function HistoryPage() { const { data, isLoading, error } = useAlerts({ state: 'RESOLVED', limit: 200 }); if (isLoading) return ; if (error) return
Failed to load history: {String(error)}
; const rows = data ?? []; return (
History
{rows.length === 0 ? (
No resolved alerts in retention window.
) : ( rows.map((a) => ) )}
); }