Skip to content

Commit

Permalink
fix: place consents in appropriate section
Browse files Browse the repository at this point in the history
  • Loading branch information
mirovladimitrovski committed Jan 17, 2024
1 parent ff3b2bc commit 6281640
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/components/Account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true }
const nonTerms: Consent[] = [];

publisherConsents?.forEach((consent) => {
if (consent?.type === 'checkbox') {
if (!consent?.type || consent?.type === 'checkbox') {
terms.push(consent);
} else {
nonTerms.push(consent);
Expand Down
48 changes: 12 additions & 36 deletions src/components/Account/__snapshots__/Account.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -134,51 +134,27 @@ exports[`<Account> > renders and matches snapshot 1`] = `
account.terms_and_tracking
</h3>
</div>
<form
class="_flexBox_1c1c63"
novalidate=""
/>
<div
class="_controls_1c1c63"
/>
</div>
<div
class="panel-class"
>
<div
class="header-class"
>
<h3>
account.other_registration_details
</h3>
</div>
<form
class="_flexBox_1c1c63"
novalidate=""
>
<div
class="_customFields_c968f7"
data-testid="custom-reg-fields"
class="_checkbox_531f07"
>
<div
class="_checkbox_531f07"
data-testid="crf-undefined"
class="_row_531f07"
>
<div
class="_row_531f07"
<input
id="check-box_1235_consentsValues.marketing"
name="consentsValues.marketing"
type="checkbox"
value=""
/>
<label
for="check-box_1235_consentsValues.marketing"
>
<input
id="check-box_1235_consentsValues.marketing"
name="consentsValues.marketing"
type="checkbox"
value=""
/>
<label
for="check-box_1235_consentsValues.marketing"
>
Receive Marketing Emails
</label>
</div>
Receive Marketing Emails
</label>
</div>
</div>
</form>
Expand Down

0 comments on commit 6281640

Please sign in to comment.