Unified loading states.

This commit is contained in:
Mike Cao 2025-06-13 21:13:11 -07:00
parent 7b5591a3ce
commit da8c7e99c5
52 changed files with 506 additions and 364 deletions

View file

@ -1,10 +1,10 @@
import { useApi } from '@/components/hooks';
import { UseQueryOptions, QueryKey } from '@tanstack/react-query';
import { ReactQueryOptions } from '@/lib/types';
export function useResultQuery<T>(
type: string,
params?: { [key: string]: any },
options?: Omit<UseQueryOptions<T, Error, T, QueryKey>, 'queryKey' | 'queryFn'>,
options?: ReactQueryOptions<T>,
) {
const { post, useQuery } = useApi();