Now uses GetAllUsers
This commit is contained in:
parent
b20817ec8a
commit
4e100229f5
1 changed files with 4 additions and 6 deletions
|
@ -2,15 +2,13 @@ import BasicWindow from "../../Components/BasicWindow";
|
||||||
import Button from "../../Components/Button";
|
import Button from "../../Components/Button";
|
||||||
import BackButton from "../../Components/BackButton";
|
import BackButton from "../../Components/BackButton";
|
||||||
import { UserListAdmin } from "../../Components/UserListAdmin";
|
import { UserListAdmin } from "../../Components/UserListAdmin";
|
||||||
import { PublicUser } from "../../Types/goTypes";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import GetAllUsers from "../../Components/GetAllUsers";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
function AdminManageUsers(): JSX.Element {
|
function AdminManageUsers(): JSX.Element {
|
||||||
//TODO: Change so that it reads users from database
|
const [users, setUsers] = useState<string[]>([]);
|
||||||
const users: PublicUser[] = [];
|
GetAllUsers({ setUsersProp: setUsers });
|
||||||
for (let i = 1; i <= 20; i++) {
|
|
||||||
users.push({ userId: "id" + i, username: "Example User " + i });
|
|
||||||
}
|
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue