fixes
This commit is contained in:
@@ -12,9 +12,11 @@ export interface ReportParams {
|
||||
export function useReport(params: ReportParams) {
|
||||
const { get } = useResource("reports");
|
||||
|
||||
const { snapshot_id, ...queryParams } = params;
|
||||
|
||||
return useQuery({
|
||||
queryKey: ["reports", "read", params],
|
||||
queryFn: () =>
|
||||
get(params.snapshot_id ? params.snapshot_id : "latest"),
|
||||
get(snapshot_id ?? "latest", queryParams),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user