Skip to content

Commit dd11eee

Browse files
authored
Merge pull request #14590 from guardian/tf-gate-popup
Update sign-in gate treatmentType
2 parents a20b6cb + fe8e08e commit dd11eee

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,13 @@ export interface TreatmentContentDecoded {
9898
second_cta_name?: string;
9999
}
100100

101+
// The treatmentType is how Auxia tells the client which type of gate to display
102+
// The spelling of "dismissible" is inconsistent here, but this is because the treatments were set up this way in Auxia.
101103
export type AuxiaAPIResponseDataUserTreatmentType =
102104
| 'DISMISSABLE_SIGN_IN_GATE'
103-
| 'NONDISMISSIBLE_SIGN_IN_GATE';
105+
| 'NONDISMISSIBLE_SIGN_IN_GATE'
106+
| 'DISMISSABLE_SIGN_IN_GATE_POPUP'
107+
| 'NONDISMISSIBLE_SIGN_IN_GATE_POPUP';
104108

105109
export interface AuxiaAPIResponseDataUserTreatment {
106110
treatmentId: string;

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export const getAuxiaGateVersion = (
258258
String(version).toLowerCase().endsWith('v2') ||
259259
String(userTreatment?.treatmentType)
260260
.toLowerCase()
261-
.includes('v2')
261+
.endsWith('POPUP')
262262
) {
263263
return 'v2';
264264
}

0 commit comments

Comments
 (0)