mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-26 22:26:10 +00:00
chore: bump next-auth (#491)
* chore: bump `next-auth` * shorten message
This commit is contained in:
@@ -12,7 +12,7 @@ import { Button } from './button';
|
||||
import { useFormState, useFormStatus } from 'react-dom';
|
||||
|
||||
export default function LoginForm() {
|
||||
const [state, dispatch] = useFormState(authenticate, undefined);
|
||||
const [errorMessage, dispatch] = useFormState(authenticate, undefined);
|
||||
|
||||
return (
|
||||
<form action={dispatch} className="space-y-3">
|
||||
@@ -67,10 +67,10 @@ export default function LoginForm() {
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
>
|
||||
{state === 'CredentialsSignin' && (
|
||||
{errorMessage && (
|
||||
<>
|
||||
<ExclamationCircleIcon className="h-5 w-5 text-red-500" />
|
||||
<p className="text-sm text-red-500">Invalid credentials</p>
|
||||
<p className="text-sm text-red-500">{errorMessage}</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user