16 lines
605 B
TypeScript
16 lines
605 B
TypeScript
'use client';
|
|
import { getServices } from '@/actions/services';
|
|
// eslint-disable-next-line sonarjs/no-internal-api-use
|
|
import type * as ApolloTypes from '@repo/graphql/node_modules/@apollo/client/core';
|
|
import { type GetServicesQueryVariables } from '@repo/graphql/types';
|
|
import { useQuery } from '@tanstack/react-query';
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
type FixTypescriptCringe = ApolloTypes.FetchResult;
|
|
|
|
export const useServicesQuery = (input?: GetServicesQueryVariables) =>
|
|
useQuery({
|
|
queryFn: () => getServices(input),
|
|
queryKey: ['services', 'list'],
|
|
});
|