We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59d6e3a commit cf57e54Copy full SHA for cf57e54
src/modules/User/hooks/index.ts
@@ -0,0 +1 @@
1
+export * from "./useUsers";
src/modules/User/hooks/useUsers.tsx
@@ -1,9 +1,9 @@
import { useQuery } from "react-query";
2
3
-import { getUserListAsync } from "../services";
+import { getUserListAsync, User } from "../services";
4
5
export const useUsers = () => {
6
- const { data, isLoading } = useQuery("users", async () => {
+ const { data, isLoading } = useQuery<User[] | undefined>("users", async () => {
7
const { data } = await getUserListAsync();
8
return data;
9
});
0 commit comments