ocadotechnology / codeforlife-portal-frontend

0 stars 19 forks source link

conditionally render 'remove from newsletter' checkbox #34

Open SKairinos opened 2 months ago

SKairinos commented 2 months ago

When a user is deleting their account, there's a checkbox which allows them to remove their email address from our newsletter. The checkbox is always rendered, regardless of whether or not they are registered to our newsletter. We should only render this checkbox if the user is currently registered to our newsletter.

To support this change, will need to modify the to_representation method on the user serializer in the CFL python package. This data object should include a boolean field called added_to_newsletter, which will be set by calling Dotdigital's API.