restaurants

This commit is contained in:
hamid zarghami
2025-12-31 08:53:07 +03:30
parent bc61ea6a20
commit cd73c22c3f
5 changed files with 37 additions and 9 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import {
GroupIconsResponse,
ReportsResponse,
SystemRolesResponse,
RestaurantAdminsResponse,
} from "../types/Types";
export const useGetIcons = () => {
@@ -59,7 +60,7 @@ export const useGetRestaurants = () => {
};
export const useGetRestaurantAdmins = (restaurantId: string) => {
return useQuery({
return useQuery<RestaurantAdminsResponse>({
queryKey: ["restaurant-admins", restaurantId],
queryFn: () => api.getRestaurantAdmins(restaurantId),
enabled: !!restaurantId,