Don't allow duplicate usernames in new game ban modal
This commit is contained in:
parent
8cc3f58ca2
commit
3ed7186d78
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user