import { useActionQuery } from "@agent-native/core/client/hooks"; import { ActionQueryError } from "../../components/action-query-error"; import { DispatchShell } from "../../components/dispatch-shell"; import { Skeleton } from "../../components/ui/skeleton"; export function meta() { return [{ title: "Audit — Dispatch" }]; } export default function AuditRoute() { const query = useActionQuery("list-dispatch-audit", { limit: 100 }); const { data } = query; return (
{query.isError ? ( void query.refetch()} /> ) : query.isLoading ? (
{Array.from({ length: 6 }).map((_, index) => (
))}
) : (
{(data || []).map((event: any) => (
{event.summary}
{event.actor} · {event.action}
{new Date(event.createdAt).toLocaleString()}
))} {(data?.length || 0) === 0 && (
No audit entries yet.
)}
)}
); }