diff --git a/frontend/src/hooks/useAuth.ts b/frontend/src/hooks/useAuth.ts index 58d8db7..397e408 100644 --- a/frontend/src/hooks/useAuth.ts +++ b/frontend/src/hooks/useAuth.ts @@ -43,6 +43,10 @@ const useAuth = () => { errDetail = err.message } + if (Array.isArray(errDetail)) { + errDetail = "Something went wrong" + } + setError(errDetail) }, }) diff --git a/frontend/src/routes/login.tsx b/frontend/src/routes/login.tsx index 55db35f..b2ee1f6 100644 --- a/frontend/src/routes/login.tsx +++ b/frontend/src/routes/login.tsx @@ -92,6 +92,7 @@ function Login() { })} placeholder="Email" type="email" + required /> {errors.username && ( {errors.username.message} @@ -103,6 +104,7 @@ function Login() { {...register("password")} type={show ? "text" : "password"} placeholder="Password" + required />