Skip to content

Commit

Permalink
Refactor: hide the age consent from RegisterEmail and RegsiterAnonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Nov 1, 2024
1 parent 92643ce commit 2e2800b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/blocks/RegisterAnonymous/RegisterAnonymous.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,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 Expand Up @@ -163,7 +163,7 @@ export const RegisterAnonymous = () => {
data.password &&
data.confirmPassword &&
data.isPrivacyAndTermsSelected &&
data.isAgeTermsSelected &&
// data.isAgeTermsSelected &&
data.nickname;

const handleRegisterButtonClick = () => {
Expand Down Expand Up @@ -256,11 +256,11 @@ export const RegisterAnonymous = () => {
textFour={t("terms_agreement_text_4")}
Link={Link}
/>
<TermsAgreement
{/* <TermsAgreement
isChecked={data.isAgeTermsSelected}
setIsChecked={(val) => handleChange("isAgeTermsSelected", val)}
textOne={t("age_terms_agreement_text_1")}
/>
/> */}
<Button
label={t("register_button_label")}
size="lg"
Expand Down
8 changes: 4 additions & 4 deletions src/blocks/RegisterEmail/RegisterEmail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 @@ -109,7 +109,7 @@ export const RegisterEmail = ({
data.password &&
data.confirmPassword &&
data.isPrivacyAndTermsSelected &&
data.isAgeTermsSelected &&
// data.isAgeTermsSelected &&
data.email &&
data.nickname &&
isCaptchaValid;
Expand Down Expand Up @@ -163,11 +163,11 @@ export const RegisterEmail = ({
textFour={t("terms_agreement_text_4")}
Link={Link}
/>
<TermsAgreement
{/* <TermsAgreement
isChecked={data.isAgeTermsSelected}
setIsChecked={(val) => handleChange("isAgeTermsSelected", val)}
textOne={t("age_terms_agreement_text_1")}
/>
/> */}
{showCaptcha && (
<ReCAPTCHA
sitekey={RECAPTCHA_SITE_KEY}
Expand Down
2 changes: 1 addition & 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

0 comments on commit 2e2800b

Please sign in to comment.