// Keys are prefixed with the tool name so the four tools never collide in the shared query cache. import { useQuery } from '@tanstack/react-query' import { recruitApi } from './api' export function useRecruitDashboard() { return useQuery({ queryKey: ['recruitmatch', 'dashboard'], queryFn: recruitApi.dashboard }) } // retry false on both: these are capability gated, so a role without access should fail fast // rather than retry a 403 it will never pass. export function useAlerts() { return useQuery({ queryKey: ['recruitmatch', 'alerts'], queryFn: recruitApi.alerts, retry: false }) } export function useRecommendations() { return useQuery({ queryKey: ['recruitmatch', 'recommendations'], queryFn: recruitApi.recommendations, retry: false, }) }