fix password repetition check

This commit is contained in:
2025-12-19 12:39:48 +01:00
parent 2e96583424
commit 685c877ffa

View File

@@ -49,6 +49,7 @@ export const Register = () => {
setPasswordHint(""); setPasswordHint("");
} else setPasswordHint("passwords do not match"); } else setPasswordHint("passwords do not match");
} }
useEffect(() => passwordCheck(), [passwordr]);
async function handleSubmit(e: FormEvent) { async function handleSubmit(e: FormEvent) {
e.preventDefault(); e.preventDefault();
@@ -150,7 +151,6 @@ export const Register = () => {
/> />
</div> </div>
<div className="field"> <div className="field">
<label className="label">repeat password</label>
<input <input
className={"input" + (passwordHint ? " is-danger" : "")} className={"input" + (passwordHint ? " is-danger" : "")}
type={"password"} type={"password"}
@@ -163,7 +163,6 @@ export const Register = () => {
onChange={(evt) => { onChange={(evt) => {
setError(""); setError("");
setPasswordr(evt.target.value); setPasswordr(evt.target.value);
passwordCheck();
}} }}
/> />
<p className={"help is-danger"}>{passwordHint}</p> <p className={"help is-danger"}>{passwordHint}</p>