Skip to content

Commit 4a0b2bc

Browse files
domlanderabeddow91
andcommitted
Update types to expect "isImmersive" value
Co-authored-by: Anna Beddow <[email protected]>
1 parent 8f10440 commit 4a0b2bc

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ const SplashCardLayout = ({
196196
const card = cards[0];
197197
if (!card) return null;
198198

199-
// TODO: replace with live data from fronts tool - used for testing
200-
const shouldShowImmersive = false;
201-
199+
const shouldShowImmersive = card.isImmersive;
202200
if (shouldShowImmersive) {
203201
return (
204202
<UL>

dotcom-rendering/src/frontend/feFront.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export type FEFrontCard = {
250250
display: {
251251
isBoosted: boolean;
252252
boostLevel?: BoostLevel;
253+
isImmersive?: boolean;
253254
showBoostedHeadline: boolean;
254255
showQuotedHeadline: boolean;
255256
imageHide: boolean;

dotcom-rendering/src/model/enhanceCards.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ export const enhanceCards = (
324324
snapData: enhanceSnaps(faciaCard.enriched),
325325
isBoosted: faciaCard.display.isBoosted,
326326
boostLevel: faciaCard.display.boostLevel,
327+
isImmersive: !!faciaCard.display.isImmersive,
327328
isCrossword: faciaCard.properties.isCrossword,
328329
isNewsletter,
329330
isCartoon,

dotcom-rendering/src/types/front.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export type DCRFrontCard = {
9090
snapData?: DCRSnapType;
9191
isBoosted?: boolean;
9292
boostLevel?: BoostLevel;
93+
isImmersive: boolean;
9394
isCrossword?: boolean;
9495
isNewsletter?: boolean;
9596
isCartoon?: boolean;

0 commit comments

Comments
 (0)