From 2b3d32a641da19c9d807f1877efcbe1a130c5e23 Mon Sep 17 00:00:00 2001
From: Michael Hunteman <michael@huntm.net>
Date: Fri, 1 Mar 2024 07:44:28 -0800
Subject: Use guest for login and RSVP update

---
 src/features/auth/GuestLogin.tsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/features/auth/GuestLogin.tsx')

diff --git a/src/features/auth/GuestLogin.tsx b/src/features/auth/GuestLogin.tsx
index 8585e61..61a8fa1 100644
--- a/src/features/auth/GuestLogin.tsx
+++ b/src/features/auth/GuestLogin.tsx
@@ -20,8 +20,7 @@ function GuestLogin() {
 
   const onSubmit = async (data: LoginRequest) => {
       try {
-        const user = await login(data).unwrap();
-        dispatch(setCredentials(user));
+        dispatch(setCredentials(await login(data).unwrap()));
         navigate('/rsvp');
       } catch (e) {
         console.log(e);
-- 
cgit v1.2.3

