Skip to content

Commit 615170d

Browse files
authored
🚸 Mark login field as required (#1166)
1 parent c947cb0 commit 615170d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

frontend/src/hooks/useAuth.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ const useAuth = () => {
4343
errDetail = err.message
4444
}
4545

46+
if (Array.isArray(errDetail)) {
47+
errDetail = "Something went wrong"
48+
}
49+
4650
setError(errDetail)
4751
},
4852
})

frontend/src/routes/login.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ function Login() {
9292
})}
9393
placeholder="Email"
9494
type="email"
95+
required
9596
/>
9697
{errors.username && (
9798
<FormErrorMessage>{errors.username.message}</FormErrorMessage>
@@ -103,6 +104,7 @@ function Login() {
103104
{...register("password")}
104105
type={show ? "text" : "password"}
105106
placeholder="Password"
107+
required
106108
/>
107109
<InputRightElement
108110
color="ui.dim"

0 commit comments

Comments
 (0)