import { useQuery } from "@tanstack/react-query";
import * as api from "../service/Service";

export const useGetAllRestaurants = () => {
  return useQuery({
    queryKey: ["restaurants"],
    queryFn: api.getAllRestaurants,
  });
};
