Skip to content

Commit

Permalink
fix(clerk-js): Fix issue for legal consent checkbox showing up in whe…
Browse files Browse the repository at this point in the history
…n disabled (#4403)
  • Loading branch information
octoper authored Oct 24, 2024
1 parent 83c0e7f commit d82886c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-coins-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/clerk-js": patch
---

Fix for legal consent rendered on the <SignUp/> component when only social sign up is enabled
5 changes: 3 additions & 2 deletions packages/clerk-js/src/ui/components/SignUp/SignUpStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ function _SignUpStart(): JSX.Element {
const hasTicket = !!formState.ticket.value;
const hasEmail = !!formState.emailAddress.value;
const isProgressiveSignUp = userSettings.signUp.progressive;
const isLegalConsentEnabled = userSettings.signUp.legal_consent_enabled;

const fields = determineActiveFields({
attributes,
hasTicket,
hasEmail,
activeCommIdentifierType,
isProgressiveSignUp,
legalConsentRequired: userSettings.signUp.legal_consent_enabled,
legalConsentRequired: isLegalConsentEnabled,
});

const handleTokenFlow = () => {
Expand Down Expand Up @@ -293,7 +294,7 @@ function _SignUpStart(): JSX.Element {
/>
)}
</SocialButtonsReversibleContainerWithDivider>
{!shouldShowForm && (
{!shouldShowForm && isLegalConsentEnabled && (
<Form.ControlRow elementId='__experimental_legalAccepted'>
<LegalCheckbox
{...formState.__experimental_legalAccepted.props}
Expand Down

0 comments on commit d82886c

Please sign in to comment.