bug fix logout
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user