Download src/admin/Users.tsx from TwanAPI/123: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/spaces/TwanAPI/123/resolve/main/src/admin/Users.tsx
- Command line
-
hf download hf://spaces/TwanAPI/123/src/admin/Users.tsx
-
curl -L -o Users.tsx https://huggingface.co/spaces/TwanAPI/123/resolve/main/src/admin/Users.tsx
483 Bytes
| import { useEffect, useState } from "react"; | |
| import api from "../api"; | |
| export default function Users() { | |
| const [users, setUsers] = useState<any[]>([]); | |
| useEffect(() => { | |
| api.get("/admin/users").then((r) => setUsers(r.data)); | |
| }, []); | |
| return ( | |
| <div> | |
| <h1 className="font-bold mb-4">Users</h1> | |
| {users.map((u) => ( | |
| <div key={u._id} className="p-3 bg-zinc-900 rounded mb-2"> | |
| {u.email} · {u.plan} | |
| </div> | |
| ))} | |
| </div> | |
| ); | |
| } | |