Skip to content

Commit a19272d

Browse files
author
Juarez Mota
committed
feat: check if sign-in gate is dismissible by treatment type
1 parent d4f4877 commit a19272d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

dotcom-rendering/src/components/SignInGate/gateDesigns/SignInGateAuxia.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,8 @@ export const SignInGateAuxia = ({
5050
return input !== '';
5151
};
5252

53-
/*
54-
Whether the gate is dismissible is carried by `secondCtaName` which if it's truthy
55-
makes the gate dismissible and otherwise is non dismissible.
56-
*/
57-
58-
const isDismissible = !!secondCtaName;
53+
const isDismissible =
54+
userTreatment.treatmentType === 'DISMISSABLE_SIGN_IN_GATE';
5955
const dismissStatusLabel = isDismissible
6056
? 'dismissible'
6157
: 'non-dismissible';

dotcom-rendering/src/components/SignInGate/gateDesigns/SignInGateAuxiaV2.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export const SignInGateAuxiaV2 = ({
4848
body,
4949
first_cta_name: firstCtaName,
5050
first_cta_link: firstCtaLink,
51-
second_cta_name: secondCtaName,
5251
} = JSON.parse(userTreatment.treatmentContent) as TreatmentContentDecoded;
5352

5453
const has = (s?: string) => !!s && s.trim() !== '';
55-
const isDismissible = has(secondCtaName);
54+
const isDismissible =
55+
userTreatment.treatmentType === 'DISMISSABLE_SIGN_IN_GATE';
5656
const dismissStatusLabel = isDismissible
5757
? 'dismissible'
5858
: 'non-dismissible';

0 commit comments

Comments
 (0)