File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
dotcom-rendering/src/components/SignInGate Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ export const SignInGateAuxiaV1 = ({
4545 body,
4646 first_cta_name : firstCtaName ,
4747 first_cta_link : firstCtaLink ,
48- second_cta_name : secondCtaName ,
4948 } = JSON . parse ( userTreatment . treatmentContent ) as TreatmentContentDecoded ;
5049
5150 const has = ( s ?: string ) => ! ! s && s . trim ( ) !== '' ;
52- const isDismissible = has ( secondCtaName ) ;
51+ const isDismissible =
52+ userTreatment . treatmentType === 'DISMISSABLE_SIGN_IN_GATE' ;
5353 const dismissStatusLabel = isDismissible
5454 ? 'dismissible'
5555 : 'non-dismissible' ;
Original file line number Diff line number Diff line change @@ -98,13 +98,17 @@ export interface TreatmentContentDecoded {
9898 second_cta_name ?: string ;
9999}
100100
101+ export type AuxiaAPIResponseDataUserTreatmentType =
102+ | 'DISMISSABLE_SIGN_IN_GATE'
103+ | 'NONDISMISSIBLE_SIGN_IN_GATE' ;
104+
101105export interface AuxiaAPIResponseDataUserTreatment {
102106 treatmentId : string ;
103107 treatmentTrackingId : string ;
104108 rank : string ;
105109 contentLanguageCode : string ;
106110 treatmentContent : string ;
107- treatmentType : string ;
111+ treatmentType : AuxiaAPIResponseDataUserTreatmentType ;
108112 surface : string ;
109113}
110114
You can’t perform that action at this time.
0 commit comments