restaurant list fix + pager

This commit is contained in:
hamid zarghami
2026-01-04 12:04:03 +03:30
parent cd73c22c3f
commit 9af21acb90
4 changed files with 42 additions and 11 deletions
+3 -3
View File
@@ -52,10 +52,10 @@ export const useGetReports = () => {
});
};
export const useGetRestaurants = () => {
export const useGetRestaurants = (page: number = 1, limit: number = 10) => {
return useQuery({
queryKey: ["restaurants"],
queryFn: api.getRestaurants,
queryKey: ["restaurants", page, limit],
queryFn: () => api.getRestaurants(page, limit),
});
};