bug fix logout

This commit is contained in:
hamid zarghami
2025-12-01 09:59:03 +03:30
parent 65679c1b2a
commit 788d23b185
2 changed files with 75 additions and 59 deletions
@@ -1,10 +1,12 @@
import { useQuery } from "@tanstack/react-query";
import * as api from "../service/ProfileService";
import { getToken } from "@/lib/api/func";
export const useGetProfile = () => {
return useQuery({
queryKey: ["profile"],
queryFn: api.getProfile,
retry: false,
enabled: !!getToken(),
});
};