mirror of
https://github.com/khairul169/vaulterm.git
synced 2025-04-28 16:49:39 +07:00
11 lines
249 B
TypeScript
11 lines
249 B
TypeScript
import authRepo from "@/repositories/auth";
|
|
import { useQuery } from "@tanstack/react-query";
|
|
|
|
export const useUser = () => {
|
|
const { data: user } = useQuery({
|
|
queryKey: ["auth", "user"],
|
|
queryFn: authRepo.getUser,
|
|
});
|
|
return user;
|
|
};
|