MCPcopy Create free account
hub / github.com/adityasinghcodes/better-auth-nextjs / fetchUsers

Function fetchUsers

components/admin/users-table.tsx:22–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21 useEffect(() => {
22 const fetchUsers = async () => {
23 try {
24 setIsLoading(true);
25
26 const response = await authClient.admin.listUsers({
27 query: { limit: 10 },
28 });
29 if (response?.data) {
30 setUsers(response.data.users as User[]);
31 }
32 } catch (err) {
33 setError(
34 err instanceof Error ? err : new Error("Failed to fetch users")
35 );
36 } finally {
37 setIsLoading(false);
38 }
39 };
40
41 fetchUsers();
42 }, []);

Callers 1

UsersTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected