From 2aa44f04c965d7a7335545208bf19a1bc18c5f40 Mon Sep 17 00:00:00 2001 From: Delba de Oliveira Date: Mon, 25 Mar 2024 16:01:41 +0000 Subject: [PATCH] Clean up some tw styles for video - Clean v0 generated styles --- app/(public)/layout.tsx | 18 ++++------ app/(public)/login/form.tsx | 27 ++++++--------- app/(public)/login/page.tsx | 23 ++++++++----- app/(public)/signup/form.tsx | 60 ++++++++++++++++----------------- app/(public)/signup/page.tsx | 24 ++++++------- app/dashboard/layout.tsx | 12 +++---- app/dashboard/logout-button.tsx | 2 +- app/layout.tsx | 4 +-- 8 files changed, 83 insertions(+), 87 deletions(-) diff --git a/app/(public)/layout.tsx b/app/(public)/layout.tsx index 03268c1..cbd3525 100644 --- a/app/(public)/layout.tsx +++ b/app/(public)/layout.tsx @@ -14,23 +14,19 @@ export default function Layout({ children: React.ReactNode; }>) { return ( -
-
-
+
+
+
Login @@ -38,7 +34,7 @@ export default function Layout({
Login @@ -51,7 +47,7 @@ export default function Layout({
-
+
{children}
diff --git a/app/(public)/login/form.tsx b/app/(public)/login/form.tsx index be6d34c..16bf029 100644 --- a/app/(public)/login/form.tsx +++ b/app/(public)/login/form.tsx @@ -12,8 +12,8 @@ export function LoginForm() { return (
-
-
+
+
{state?.errors?.email && ( -

{state.errors.email}

+

{state.errors.email}

)}
-
-
+
+
- + Forgot your password?
{state?.errors?.password && ( -

{state.errors.password}

+

{state.errors.password}

)}
- {state?.message &&

{state.message}

} + {state?.message && ( +

{state.message}

+ )}
- -
- Don't have an account?{' '} - - Sign up - -
); } @@ -55,7 +50,7 @@ export function LoginButton() { const { pending } = useFormStatus(); return ( - ); diff --git a/app/(public)/login/page.tsx b/app/(public)/login/page.tsx index 623b536..afbdd99 100644 --- a/app/(public)/login/page.tsx +++ b/app/(public)/login/page.tsx @@ -1,17 +1,24 @@ import { LoginForm } from './form'; +import Link from 'next/link'; export default function Page() { return ( -
-
-
-

Login

-

- Enter your email below to login to your account -

-
+
+
+

Login

+

+ Enter your email below to login to your account +

+
+
+
+ Don't have an account?{' '} + + Sign up + +
); } diff --git a/app/(public)/signup/form.tsx b/app/(public)/signup/form.tsx index c1eab18..e5efcb8 100644 --- a/app/(public)/signup/form.tsx +++ b/app/(public)/signup/form.tsx @@ -11,37 +11,37 @@ export function SignupForm() { return (
-
- - -
- {state?.errors?.name && ( -

{state.errors.name}

- )} -
- - -
- {state?.errors?.email && ( -

{state.errors.email}

- )} -
- - -
- {state?.errors?.password && ( +
+
+ + +
+ {state?.errors?.name && ( +

{state.errors.name}

+ )} +
+ + +
+ {state?.errors?.email && ( +

{state.errors.email}

+ )}
-

Password must:

-
    - {state.errors.password.map((error) => ( -
  • - - {error} -
  • - ))} -
+ +
- )} - + {state?.errors?.password && ( +
+

Password must:

+
    + {state.errors.password.map((error) => ( +
  • - {error}
  • + ))} +
+
+ )} + +
); } @@ -50,7 +50,7 @@ export function SignupButton() { const { pending } = useFormStatus(); return ( - ); diff --git a/app/(public)/signup/page.tsx b/app/(public)/signup/page.tsx index 18983b1..ef9a0c6 100644 --- a/app/(public)/signup/page.tsx +++ b/app/(public)/signup/page.tsx @@ -2,19 +2,19 @@ import Link from 'next/link'; import { SignupForm } from '@/app/(public)/signup/form'; export default function Page() { return ( -
-
-
-

Create an account

-

Enter your information to get started

-
+
+
+

Create an account

+

Enter your information to get started

+
+
-
- Already have an account?{' '} - - Login - -
+
+
+ Already have an account?{' '} + + Login +
); diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index 446af5b..3035b21 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -26,9 +26,9 @@ export default async function Layout({ return (
-
+
-
+
Acme Inc @@ -40,9 +40,9 @@ export default async function Layout({ @@ -56,13 +56,13 @@ export default async function Layout({ ))}
-
+
-
+
{ await logout(); }} diff --git a/app/layout.tsx b/app/layout.tsx index a4774ba..2d9b1a8 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -16,9 +16,7 @@ export default async function RootLayout({ }>) { return ( - - {children} - + {children} ); }