Skip to content

Commit cf57e54

Browse files
committed
✨ update User/hook module
1 parent 59d6e3a commit cf57e54

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/modules/User/hooks/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./useUsers";

src/modules/User/hooks/useUsers.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { useQuery } from "react-query";
22

3-
import { getUserListAsync } from "../services";
3+
import { getUserListAsync, User } from "../services";
44

55
export const useUsers = () => {
6-
const { data, isLoading } = useQuery("users", async () => {
6+
const { data, isLoading } = useQuery<User[] | undefined>("users", async () => {
77
const { data } = await getUserListAsync();
88
return data;
99
});

0 commit comments

Comments
 (0)