change forder file name + change service url

This commit is contained in:
hamid zarghami
2026-02-10 10:05:33 +03:30
parent f9308b470a
commit 8670e811b0
29 changed files with 302 additions and 294 deletions
+2 -2
View File
@@ -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,
});
};