mirror of
https://github.com/docmost/docmost.git
synced 2026-05-08 23:33:09 +08:00
1412f1d982
* work on groups ui * move settings to its own page * other fixes and refactoring
13 lines
401 B
TypeScript
13 lines
401 B
TypeScript
import { useQuery, UseQueryResult } from "@tanstack/react-query";
|
|
import { getUserInfo } from "@/features/user/services/user-service";
|
|
import { ICurrentUser } from "@/features/user/types/user.types";
|
|
|
|
export default function useCurrentUser(): UseQueryResult<ICurrentUser> {
|
|
return useQuery({
|
|
queryKey: ["currentUser"],
|
|
queryFn: async () => {
|
|
return await getUserInfo();
|
|
},
|
|
});
|
|
}
|