claude 1 - fixes : -/
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 24m33s

This commit is contained in:
2026-01-08 22:30:21 -08:00
parent 62470e7661
commit 74a5ca6331
14 changed files with 509 additions and 456 deletions

View File

@@ -1,18 +1,7 @@
// src/hooks/queries/useActivityLogQuery.ts
import { useQuery } from '@tanstack/react-query';
import * as apiClient from '../../services/apiClient';
interface ActivityLogEntry {
activity_log_id: number;
user_id: string;
action: string;
entity_type: string | null;
entity_id: number | null;
details: any;
ip_address: string | null;
user_agent: string | null;
created_at: string;
}
import { fetchActivityLog } from '../../services/apiClient';
import type { ActivityLogItem } from '../../types';
/**
* Query hook for fetching the admin activity log.
@@ -33,8 +22,8 @@ interface ActivityLogEntry {
export const useActivityLogQuery = (limit: number = 20, offset: number = 0) => {
return useQuery({
queryKey: ['activity-log', { limit, offset }],
queryFn: async (): Promise<ActivityLogEntry[]> => {
const response = await apiClient.fetchActivityLog(limit, offset);
queryFn: async (): Promise<ActivityLogItem[]> => {
const response = await fetchActivityLog(limit, offset);
if (!response.ok) {
const error = await response.json().catch(() => ({