diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsx index 2fe486863b..d37d4677ec 100644 --- a/apps/web/modules/signup-view.tsx +++ b/apps/web/modules/signup-view.tsx @@ -206,10 +206,10 @@ export default function Signup({ } }, [redirectUrl]); - const [COOKIE_CONSENT, setCOOKIE_CONSENT] = useState(false); + const [userConsentToCookie, setUserConsentToCookie] = useState(false); // No need to be checked for user to proceed function handleConsentChange(consent: boolean) { - setCOOKIE_CONSENT(!consent); + setUserConsentToCookie(!consent); } const loadingSubmitState = isSubmitSuccessful || isSubmitting; @@ -297,7 +297,7 @@ export default function Signup({ return ( <> - {IS_CALCOM && (!IS_EUROPE || COOKIE_CONSENT) ? ( + {IS_CALCOM && (!IS_EUROPE || userConsentToCookie) ? ( <> {process.env.NEXT_PUBLIC_GTM_ID && ( <> @@ -342,6 +342,7 @@ export default function Signup({ color="minimal" className="hover:bg-subtle todesktop:mt-10 mb-6 flex h-6 max-h-6 w-full items-center rounded-md px-3 py-2" StartIcon="arrow-left" + data-testid="signup-back-button" onClick={() => { setDisplayEmailForm(false); setIsSamlSignup(false); @@ -432,7 +433,8 @@ export default function Signup({ ) : null} handleConsentChange(COOKIE_CONSENT)} + data-testid="signup-cookie-content-checkbox" + onChange={() => handleConsentChange(userConsentToCookie)} description={t("cookie_consent_checkbox")} /> {errors.apiError && ( @@ -445,6 +447,7 @@ export default function Signup({ )} {isSamlSignup ? ( {isSAMLLoginEnabled && (