header and notification
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import * as api from "../service/Service";
|
||||
|
||||
export const useGetProfile = () => {
|
||||
return useQuery({
|
||||
queryKey: ["profile"],
|
||||
queryFn: api.getProfile,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import axios from "@/config/axios";
|
||||
|
||||
export const getProfile = async () => {
|
||||
const { data } = await axios.get("/users/me");
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user