diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index b4aa1e1..ee8a987 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { useState } from 'react' +import { Suspense, useState } from 'react' import { useRouter, useSearchParams } from 'next/navigation' import { signIn } from 'next-auth/react' import { Button } from '@/components/ui/button' @@ -15,7 +15,7 @@ import { CardTitle, } from '@/components/ui/card' -export default function LoginPage() { +function LoginForm() { const router = useRouter() const searchParams = useSearchParams() const callbackUrl = searchParams.get('callbackUrl') || '/' @@ -55,79 +55,107 @@ export default function LoginPage() { } return ( -
- - - - LetsBe Hub - - - Sign in to your account - - -
- - {(error || loginError) && ( -
- {error === 'CredentialsSignin' - ? 'Invalid email or password' - : loginError || error} -
- )} - -
- - + + + + LetsBe Hub + + + Sign in to your account + + + + + {(error || loginError) && ( +
+ {error === 'CredentialsSignin' + ? 'Invalid email or password' + : loginError || error}
+ )} -
- - setEmail(e.target.value)} - required - autoComplete="email" - /> -
- -
- - setPassword(e.target.value)} - required - autoComplete="current-password" - /> -
-
- - - - - -
+ +
+ +
+ + setEmail(e.target.value)} + required + autoComplete="email" + /> +
+ +
+ + setPassword(e.target.value)} + required + autoComplete="current-password" + /> +
+
+ + + + + +
+ ) +} + +function LoginFormSkeleton() { + return ( + + + + LetsBe Hub + + + Loading... + + + +
+
+
+ + + ) +} + +export default function LoginPage() { + return ( +
+ }> + +
) }