Skip to content

Commit

Permalink
Fix: uncomment isAgeTermsSelected fields
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Nov 29, 2024
1 parent 3b76212 commit d3c63fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/blocks/RegisterAnonymous/RegisterAnonymous.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export const RegisterAnonymous = () => {
.label(t("password_match_error")),
nickname: Joi.string().label(t("nickname_error")),
isPrivacyAndTermsSelected: Joi.boolean().invalid(false),
// isAgeTermsSelected: Joi.boolean().invalid(false),
isAgeTermsSelected: Joi.boolean().invalid(false),
});

const [data, setData] = useState({
password: "",
nickname: "",
isPrivacyAndTermsSelected: false,
// isAgeTermsSelected: false,
isAgeTermsSelected: false,
confirmPassword: "",
});
const [errors, setErrors] = useState({});
Expand Down
6 changes: 3 additions & 3 deletions src/blocks/RegisterEmail/RegisterEmail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const RegisterEmail = ({
.label(t("email_error")),
nickname: Joi.string().label(t("nickname_error")),
isPrivacyAndTermsSelected: Joi.boolean(),
// isAgeTermsSelected: Joi.boolean(),
isAgeTermsSelected: Joi.boolean(),
});

const [errors, setErrors] = useState({});
Expand Down Expand Up @@ -107,7 +107,7 @@ export const RegisterEmail = ({
handleSubmit();
}
};

console.log(errors, "errors");
const handleLoginRedirect = () => {
navigate("/login");
};
Expand All @@ -116,7 +116,7 @@ export const RegisterEmail = ({
data.password &&
data.confirmPassword &&
data.isPrivacyAndTermsSelected &&
// data.isAgeTermsSelected &&
data.isAgeTermsSelected &&
data.email &&
data.nickname &&
isCaptchaValid;
Expand Down
3 changes: 2 additions & 1 deletion src/pages/RegisterEmail/RegisterEmail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const RegisterEmail = () => {
nickname: "",
password: "",
isPrivacyAndTermsSelected: false,
// isAgeTermsSelected: false,
isAgeTermsSelected: false,
confirmPassword: "",
});
const SHOW_CAPTCHA = import.meta.env.MODE !== "development";
Expand Down Expand Up @@ -70,6 +70,7 @@ export const RegisterEmail = () => {
setSubmitError(null);
},
onError: (error) => {
console.log(error, "error");
const { message: errorMessage } = useError(error);
setSubmitError(errorMessage);
},
Expand Down

0 comments on commit d3c63fb

Please sign in to comment.