Skip to content

Commit 5048fbe

Browse files
committed
Auxia gate: make second cta optional
1 parent 94b325a commit 5048fbe

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,27 @@ export const SignInGateAuxia = ({
8080
>
8181
{firstCtaName}
8282
</LinkButton>
83-
<Button
84-
data-testid="sign-in-gate-main_dismiss"
85-
data-ignore="global-link-styling"
86-
cssOverrides={laterButton}
87-
priority="subdued"
88-
size="small"
89-
onClick={async () => {
90-
dismissGate();
91-
trackLink(
92-
ophanComponentId,
93-
'not-now',
94-
renderingTarget,
95-
abTest,
96-
);
97-
await logTreatmentInteractionCall('DISMISSED', '');
98-
}}
99-
>
100-
{secondCtaName}
101-
</Button>
83+
{!!secondCtaName && (
84+
<Button
85+
data-testid="sign-in-gate-main_dismiss"
86+
data-ignore="global-link-styling"
87+
cssOverrides={laterButton}
88+
priority="subdued"
89+
size="small"
90+
onClick={async () => {
91+
dismissGate();
92+
trackLink(
93+
ophanComponentId,
94+
'not-now',
95+
renderingTarget,
96+
abTest,
97+
);
98+
await logTreatmentInteractionCall('DISMISSED', '');
99+
}}
100+
>
101+
{secondCtaName}
102+
</Button>
103+
)}
102104
</div>
103105

104106
<p css={[bodySeparator, bodyBold, signInHeader]}>

dotcom-rendering/src/components/SignInGate/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export interface TreatmentContentDecoded {
9595
body: string;
9696
first_cta_name: string;
9797
first_cta_link: string;
98-
second_cta_name: string;
98+
second_cta_name?: string;
9999
}
100100

101101
export interface AuxiaAPIResponseDataUserTreatment {

0 commit comments

Comments
 (0)