mirror of
https://github.com/khairul169/vaulterm.git
synced 2025-06-17 17:19:37 +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;
|
||
|
};
|