Renamed query hooks. Fixed conversion bugs.
This commit is contained in:
1 parent
adca3c36d0
commit
7886c3f393
110 files changed
+423
-489
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { useApi } from '../useApi';
|
||||
|
||||
export function useUserQuery(userId: string, options?: { [key: string]: any }) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery({
|
||||
queryKey: ['users', userId],
|
||||
queryFn: () => get(`/users/${userId}`),
|
||||
enabled: !!userId,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user