fix

parent f24ed5c6
......@@ -32,13 +32,12 @@ const SignUp = () => {
const onChangeCredentials = (e: React.ChangeEvent<HTMLInputElement>) => {
setCredentials({ ...credentials, [e.target.name]: e.target.value });
};
const onSumit = () => {
if (credentials.password !== credentials.confrimPassword) {
return setAlert("Passwords do not match");
}
resetData();
const data = {
username: credentials.userName,
passwords: [
......@@ -50,6 +49,10 @@ const SignUp = () => {
keyup: keyupArray.current,
};
console.log("DATA ", data);
resetData();
fetch("http://localhost:3001/user/signup", {
method: "POST",
mode: "cors",
......@@ -216,6 +219,7 @@ const SignUp = () => {
onChange={onChangeCredentials}
value={credentials.confrimPassword}
onKeyDown={onKeyDown}
onKeyUp={onKeyUp}
id="password-1"
/>
</div>
......@@ -249,6 +253,7 @@ const SignUp = () => {
onChange={onChangeCredentials}
value={credentials.twoFAPassword}
onKeyDown={onKeyDown}
onKeyUp={onKeyUp}
id="password-2"
/>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment