From d0c49583388d2c4195c3eb50ebc96ab06fcc35a9 Mon Sep 17 00:00:00 2001 From: Aaron Po Date: Thu, 8 Oct 2026 23:10:48 -0400 Subject: [PATCH] Move the login and register routes onto the split-screen shell --- .../features/auth/components/LoginCallout.tsx | 18 ------ .../auth/components/RegisterCallout.tsx | 23 -------- .../app/features/auth/routes/login.tsx | 58 ++++++++++--------- .../app/features/auth/routes/register.tsx | 50 ++++++++-------- 4 files changed, 56 insertions(+), 93 deletions(-) delete mode 100644 web/frontend/app/features/auth/components/LoginCallout.tsx delete mode 100644 web/frontend/app/features/auth/components/RegisterCallout.tsx diff --git a/web/frontend/app/features/auth/components/LoginCallout.tsx b/web/frontend/app/features/auth/components/LoginCallout.tsx deleted file mode 100644 index 1b3538c7..00000000 --- a/web/frontend/app/features/auth/components/LoginCallout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { Link } from 'react-router'; - -const LoginCallout = () => ( - <> -
Already have an account?
- -
- - Sign in - - - Back to home - -
- -); - -export default LoginCallout; diff --git a/web/frontend/app/features/auth/components/RegisterCallout.tsx b/web/frontend/app/features/auth/components/RegisterCallout.tsx deleted file mode 100644 index d0317bae..00000000 --- a/web/frontend/app/features/auth/components/RegisterCallout.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { HomeSimpleDoor, UserPlus } from 'iconoir-react'; -import { Link } from 'react-router'; - -const RegisterCallout = () => ( - <> -
New here?
-
- -
- -); - -export default RegisterCallout; diff --git a/web/frontend/app/features/auth/routes/login.tsx b/web/frontend/app/features/auth/routes/login.tsx index 5178e7af..14ee7f01 100644 --- a/web/frontend/app/features/auth/routes/login.tsx +++ b/web/frontend/app/features/auth/routes/login.tsx @@ -1,10 +1,10 @@ import { zodResolver } from '@hookform/resolvers/zod'; -import { LogIn } from 'iconoir-react'; import { useForm } from 'react-hook-form'; import { redirect, useNavigation, useSubmit } from 'react-router'; import { createAuthSession, getOptionalAuth, login } from '../auth.server'; +import AuthSplitLayout from '../components/AuthSplitLayout'; +import AuthSwitchPrompt from '../components/AuthSwitchPrompt'; import LoginForm from '../components/LoginForm'; -import RegisterCallout from '../components/RegisterCallout'; import { useActionErrorToast } from '../hooks/useActionErrorToast'; import { loginSchema, type LoginSchema } from '../schemas'; import type { Route } from './+types/login'; @@ -54,34 +54,36 @@ const Login = ({ actionData }: Route.ComponentProps) => { useActionErrorToast(actionData?.error); return ( -
-
-
-
-

-

-

Sign in to your Biergarten account

-
- - {actionData?.error && ( -
- {actionData.error} -
- )} - - - - + +
+
+

Sign in

+

Sign in to your Biergarten account

+ + {actionData?.error && ( +
+ {actionData.error} +
+ )} + + + +
-
+ ); }; diff --git a/web/frontend/app/features/auth/routes/register.tsx b/web/frontend/app/features/auth/routes/register.tsx index 1d14db2a..d5be11ec 100644 --- a/web/frontend/app/features/auth/routes/register.tsx +++ b/web/frontend/app/features/auth/routes/register.tsx @@ -2,7 +2,8 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; import { redirect, useNavigation, useSubmit } from 'react-router'; import { createAuthSession, getOptionalAuth, register } from '../auth.server'; -import LoginCallout from '../components/LoginCallout'; +import AuthSplitLayout from '../components/AuthSplitLayout'; +import AuthSwitchPrompt from '../components/AuthSwitchPrompt'; import RegisterForm from '../components/RegisterForm'; import { useActionErrorToast } from '../hooks/useActionErrorToast'; import { registerSchema, type RegisterSchema } from '../schemas'; @@ -75,31 +76,32 @@ const Register = ({ actionData }: Route.ComponentProps) => { useActionErrorToast(actionData?.error); return ( -
-
-
-
-

Register

-

Create your Biergarten account

-
- - {actionData?.error && ( -
- {actionData.error} -
- )} - - - - + +
+
+

Create your account

+

Create your Biergarten account

+ + {actionData?.error && ( +
+ {actionData.error} +
+ )} + + + +
-
+ ); };