fix: audit logs page - use array length instead of .total property

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-02 18:22:44 -08:00
parent 146d271dc3
commit ee9383d301
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ export default function AuditLogsPage() {
queryFn: () => apiClient<AuditLogsResponse>(`/api/v1/audit/logs?${queryString}`),
});
const logs = data?? [];
const total = data?.total ?? 0;
const logs = data ?? [];
const total = logs.length;
const totalPages = Math.max(1, Math.ceil(total / pageSize));
const updateFilter = useCallback((key: keyof Filters, value: string) => {