import { useQuery } from '@tanstack/react-query' import { governanceService } from '../services/governanceService' export function usePropertyActivityLog(propertyId: string) { return useQuery({ queryKey: ['activityLog', 'property', propertyId], queryFn: () => governanceService.getActivityLogByProperty(propertyId), staleTime: 30_000, select: (res) => res.data ?? [], enabled: !!propertyId, }) }