🚸 Mark login field as required (#1166)
This commit is contained in:
@@ -43,6 +43,10 @@ const useAuth = () => {
|
|||||||
errDetail = err.message
|
errDetail = err.message
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(errDetail)) {
|
||||||
|
errDetail = "Something went wrong"
|
||||||
|
}
|
||||||
|
|
||||||
setError(errDetail)
|
setError(errDetail)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@@ -92,6 +92,7 @@ function Login() {
|
|||||||
})}
|
})}
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
type="email"
|
type="email"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
{errors.username && (
|
{errors.username && (
|
||||||
<FormErrorMessage>{errors.username.message}</FormErrorMessage>
|
<FormErrorMessage>{errors.username.message}</FormErrorMessage>
|
||||||
@@ -103,6 +104,7 @@ function Login() {
|
|||||||
{...register("password")}
|
{...register("password")}
|
||||||
type={show ? "text" : "password"}
|
type={show ? "text" : "password"}
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputRightElement
|
<InputRightElement
|
||||||
color="ui.dim"
|
color="ui.dim"
|
||||||
|
Reference in New Issue
Block a user