From b999e47f9424c71acf26b9e770635f053a82099e Mon Sep 17 00:00:00 2001 From: Peter KW Date: Sun, 17 Mar 2024 19:17:34 +0100 Subject: [PATCH] Changes to handlesubmit --- frontend/src/Pages/LoginPage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/Pages/LoginPage.tsx b/frontend/src/Pages/LoginPage.tsx index f58f3e0..1ff8c9c 100644 --- a/frontend/src/Pages/LoginPage.tsx +++ b/frontend/src/Pages/LoginPage.tsx @@ -15,9 +15,10 @@ function LoginPage(props: { and if so, redirect to correct page */ function handleSubmit(event: FormEvent): void { event.preventDefault(); - props.setAuthority((prevAuth) => { - prevAuth = LoginCheck({ username: username, password: password }); - return prevAuth; + LoginCheck({ + username: username, + password: password, + setAuthority: props.setAuthority, }); }