Skip to content

Commit

Permalink
chore: default app signups to subscribers (#3587)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Mar 8, 2024
1 parent e2b8a92 commit 196a8b6
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions frontend/web/components/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ const HomePage = class extends React.Component {

constructor(props, context) {
super(props, context)

// Note that we are explicitly setting marketing consent to true
// here to reduce the complexity of the change. This is due to
// the addition of wording in our ToS and the move from Pipedrive
// to Hubspot.
// TODO: this can probably all be removed from the FE and the BE
// can handle always setting the marketing consent.
API.setCookie('marketing_consent_given', 'true')
this.state = {
marketing_consent_given:
API.getCookie('marketing_consent_given') === 'true',
marketing_consent_given: true,
}
}

Expand Down Expand Up @@ -598,27 +605,6 @@ const HomePage = class extends React.Component {
name='password'
id='password'
/>
{Utils.getFlagsmithHasFeature(
'mailing_list',
) && (
<div>
<Checkbox
label={
'Yes, I would like to signup for the twice monthly newsletter (optional)'
}
onChange={() => {
this.setState({
marketing_consent_given:
!this.state
.marketing_consent_given,
})
}}
checked={
this.state.marketing_consent_given
}
/>
</div>
)}
<div className='form-cta'>
<Button
data-test='signup-btn'
Expand Down Expand Up @@ -651,6 +637,28 @@ const HomePage = class extends React.Component {
</div>
)}
</div>
<div className='mt-4 text-center text-small text-muted'>
By signing up you agree to our{' '}
<a
style={{ opacity: 0.8 }}
target='_blank'
className='text-small'
href='https://flagsmith.com/terms-of-service/'
rel='noreferrer'
>
Terms of Service
</a>{' '}
and{' '}
<a
style={{ opacity: 0.8 }}
target='_blank'
className='text-small'
href='https://flagsmith.com/privacy-policy/'
rel='noreferrer'
>
Privacy Policy
</a>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 196a8b6

Please sign in to comment.