Don't allow duplicate usernames in new game ban modal

This commit is contained in:
2023-10-19 16:50:51 -04:00
parent 8cc3f58ca2
commit 3ed7186d78

View File

@ -48,6 +48,9 @@ export default function(props: { isOpen: boolean; onClose: () => void }) {
function addUser(user: string) {
const newUsers = [...users];
if (newUsers.includes(user))
return;
newUsers.push(user);
setUsers(newUsers);
}