chore: bump next-auth (#491)

* chore: bump `next-auth`

* shorten message
This commit is contained in:
Balázs Orbán
2023-11-29 13:44:04 +01:00
committed by GitHub
parent 7fc5092ca2
commit e75f71499f
3 changed files with 13 additions and 7 deletions

View File

@@ -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>