diff --git a/components/NewGameBan.tsx b/components/NewGameBan.tsx index cc50ab5..39f5cc6 100644 --- a/components/NewGameBan.tsx +++ b/components/NewGameBan.tsx @@ -27,6 +27,7 @@ import { type ReactElement, useState } from "react"; export default function (props: { isOpen: boolean; onClose: () => void }) { const actionMap: { [k: string]: number } = {}; const [rows, setRows] = useState([] as ReactElement[]); + const [users, setUsers] = useState([] as string[]); const toast = useToast(); const fileTypes: { [k: string]: string } = { gif: "image/gif", @@ -46,6 +47,9 @@ export default function (props: { isOpen: boolean; onClose: () => void }) { }; function addUser(user: string) { + const newUsers = [...users]; + newUsers.push(user); + const newRows = [...rows]; newRows.push(