change forder file name + change service url
This commit is contained in:
@@ -2,11 +2,11 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import * as api from "../service/MenuService";
|
||||
import { useParams } from "next/navigation";
|
||||
|
||||
export const useGetFoods = () => {
|
||||
export const useGetProducts = () => {
|
||||
const { name } = useParams<{ name: string }>();
|
||||
return useQuery({
|
||||
queryKey: ["menu"],
|
||||
queryFn: () => api.getFoods(name),
|
||||
queryFn: () => api.getProducts(name),
|
||||
enabled: !!name,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user