first commit

This commit is contained in:
2026-05-23 13:22:10 +03:30
parent 5f9ee72174
commit 6591a52f27
52 changed files with 3937 additions and 133 deletions

View File

@@ -0,0 +1,12 @@
import { useQuery } from "@tanstack/react-query";
import { getDepartments } from "../api/department.api";
export const useGetAllDepartments = () => {
return useQuery({
// قرار دادن پارامترها در queryKey باعث می‌شود با تغییر هر کدام، کش باطل و درخواست جدید ارسال شود
queryKey: ['get-all-tickets'],
queryFn: () => getDepartments(),
retry: false,
refetchOnWindowFocus: false,
});
};