Spaces:
Running
Running
File size: 386 Bytes
893662b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import { useQuery } from "@tanstack/react-query";
import {
getLogs,
} from "./logsApi";
import { GetLogsRequestParams } from "./types";
export const useGetLogs = (params: GetLogsRequestParams) => {
return useQuery({
queryKey: ["logs", params],
queryFn: async () => {
const response = await getLogs(params);
return response;
},
enabled: !!params
});
}; |