init project portal web
This commit is contained in:
20
lib/price-plan/queries/index.ts
Normal file
20
lib/price-plan/queries/index.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { pricePlanRepository } from "../data/repository"
|
||||
|
||||
export const usePricePlanQuery = (page: number, size: number, type: string) =>
|
||||
useQuery({
|
||||
queryKey: ["priceplan", page, size, type],
|
||||
queryFn: () => pricePlanRepository.getPricePlan({ page, size, type }),
|
||||
})
|
||||
|
||||
export const usePricePlanTypesQuery = () =>
|
||||
useQuery({
|
||||
queryKey: ["priceplanTypes"],
|
||||
queryFn: () => pricePlanRepository.getPricePlanTypes(),
|
||||
})
|
||||
|
||||
export const useServiceTypesQuery = () =>
|
||||
useQuery({
|
||||
queryKey: ["serviceTypes"],
|
||||
queryFn: () => pricePlanRepository.getServiceTypes(),
|
||||
})
|
||||
Reference in New Issue
Block a user