From 0c01f13b920459c43d7015d1233b67b2bede41b9 Mon Sep 17 00:00:00 2001 From: tmeunier Date: Mon, 30 Mar 2026 10:27:42 +0200 Subject: [PATCH] fix: display error message for invalid credentials --- inertia/pages/auth/login.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/inertia/pages/auth/login.tsx b/inertia/pages/auth/login.tsx index 719776b..218813a 100644 --- a/inertia/pages/auth/login.tsx +++ b/inertia/pages/auth/login.tsx @@ -6,7 +6,11 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com import { LibraryBig, Loader2 } from 'lucide-react' export default function Login() { - const { data, setData, processing, post, reset, errors } = useForm({ + const { data, setData, processing, post, reset, errors } = useForm<{ + email: string + password: string + E_INVALID_CREDENTIALS?: string + }>({ email: '', password: '', }) @@ -42,9 +46,13 @@ export default function Login() {
- {(errors.email || errors.password) && ( - These credentials do not match our records. - )} +
+ {errors.E_INVALID_CREDENTIALS && ( + + These credentials do not match our records. + + )} +
Email