mirror of
https://github.com/docmost/docmost.git
synced 2026-05-18 07:24:04 +08:00
switch to nx monorepo
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { useQuery, UseQueryResult } from "@tanstack/react-query";
|
||||
import { getUserInfo } from "@/features/user/services/user-service";
|
||||
import { ICurrentUserResponse } from "@/features/user/types/user.types";
|
||||
|
||||
export default function useCurrentUser(): UseQueryResult<ICurrentUserResponse> {
|
||||
return useQuery({
|
||||
queryKey: ["currentUser"],
|
||||
queryFn: async () => {
|
||||
return await getUserInfo();
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user