mirror of
https://github.com/RYDE-WORK/full-stack-fastapi-template.git
synced 2026-01-19 21:23:36 +08:00
🚸 Mark login field as required (#1166)
This commit is contained in:
parent
c947cb09e1
commit
615170dc34
@ -43,6 +43,10 @@ const useAuth = () => {
|
||||
errDetail = err.message
|
||||
}
|
||||
|
||||
if (Array.isArray(errDetail)) {
|
||||
errDetail = "Something went wrong"
|
||||
}
|
||||
|
||||
setError(errDetail)
|
||||
},
|
||||
})
|
||||
|
||||
@ -92,6 +92,7 @@ function Login() {
|
||||
})}
|
||||
placeholder="Email"
|
||||
type="email"
|
||||
required
|
||||
/>
|
||||
{errors.username && (
|
||||
<FormErrorMessage>{errors.username.message}</FormErrorMessage>
|
||||
@ -103,6 +104,7 @@ function Login() {
|
||||
{...register("password")}
|
||||
type={show ? "text" : "password"}
|
||||
placeholder="Password"
|
||||
required
|
||||
/>
|
||||
<InputRightElement
|
||||
color="ui.dim"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user