mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-12 15:22:35 +02:00
Add initial users manager
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { api } from '@/renderer/api';
|
||||
import { queryKeys } from '@/renderer/api/query-keys';
|
||||
|
||||
export const useUserDetail = (options: { userId: string }) => {
|
||||
const { data, error, isLoading } = useQuery({
|
||||
queryFn: () => api.users.getUserDetail({ userId: options.userId }),
|
||||
queryKey: queryKeys.users.detail(options.userId),
|
||||
});
|
||||
|
||||
return {
|
||||
data,
|
||||
error,
|
||||
isLoading,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user