copy base dmenu to dkala

This commit is contained in:
hamid zarghami
2026-02-07 15:31:22 +03:30
commit c9e37f6177
521 changed files with 57786 additions and 0 deletions
@@ -0,0 +1,28 @@
import { useQuery } from "@tanstack/react-query";
import * as api from "../service/MenuService";
import { useParams } from "next/navigation";
export const useGetFoods = () => {
const { name } = useParams<{ name: string }>();
return useQuery({
queryKey: ["menu"],
queryFn: () => api.getFoods(name),
enabled: !!name,
});
};
export const useGetCategories = () => {
const { name } = useParams<{ name: string }>();
return useQuery({
queryKey: ["categories"],
queryFn: () => api.getCategories(name),
enabled: !!name,
});
};
export const useGetNotificationsCount = () => {
return useQuery({
queryKey: ["notifications-count"],
queryFn: api.getNotificationsCount,
});
};