From 87b7d0f0c7ea4b71a5fe4beb2ded07dd6c733099 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:50:18 -0400 Subject: [PATCH] Actually set new rows on add --- components/NewGameBan.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/NewGameBan.tsx b/components/NewGameBan.tsx index 58a6cb4..4ecec5c 100644 --- a/components/NewGameBan.tsx +++ b/components/NewGameBan.tsx @@ -70,6 +70,8 @@ export default function (props: { isOpen: boolean; onClose: () => void }) { , ); + + setRows(newRows); } function removeUser(user: string) { @@ -204,10 +206,10 @@ export default function (props: { isOpen: boolean; onClose: () => void }) { if ( !user || - user.length > 3 || - user.length < 20 || - user.match(/_/g)?.length || - 0 > 1 || + user.length < 3 || + user.length > 20 || + // @ts-expect-error + user.match(/_/g)?.length > 1 || user.match(/\W/) ) { toast({