11 lines
315 B
TypeScript
11 lines
315 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import * as api from "../service/WarrantyService";
|
|
import type { WarrantyResponse } from "../types/Types";
|
|
|
|
export const useGetWarranties = () => {
|
|
return useQuery<WarrantyResponse>({
|
|
queryKey: ["warranties"],
|
|
queryFn: () => api.getWarranties(),
|
|
});
|
|
};
|