From b999399a434ac3e5c4fe98bf9cd2e15b7578c7de Mon Sep 17 00:00:00 2001 From: Victor Castell <0x@vcastellm.xyz> Date: Mon, 30 Sep 2024 00:07:50 +0200 Subject: [PATCH] feat: login form --- ui/src/LoginPage.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/LoginPage.tsx b/ui/src/LoginPage.tsx index 9cbd37ab8..b0d526e2a 100644 --- a/ui/src/LoginPage.tsx +++ b/ui/src/LoginPage.tsx @@ -26,8 +26,7 @@ const LoginPage = (props: LoginFormProps) => { const { className } = props; const [loading, setLoading] = useSafeSetState(false); - const handleSubmit = e => { - e.preventDefault(); + const handleSubmit = (values: FormData) => { setLoading(true); login({ token }).catch(() => { setLoading(false); @@ -36,7 +35,8 @@ const LoginPage = (props: LoginFormProps) => { }; return ( - + +
{avatarIcon}
@@ -74,8 +74,8 @@ const LoginPage = (props: LoginFormProps) => { -
- +
+ ); };