Skip to content

Commit 38bc8f7

Browse files
committed
fix linting
1 parent 5419d93 commit 38bc8f7

File tree

4 files changed

+6
-32
lines changed

4 files changed

+6
-32
lines changed

dotcom-rendering/src/model/enhanceCards.ts

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,15 @@ export const getActiveMediaAtom = (
198198
videoReplace: boolean,
199199
mediaAtom?: FEMediaAtom,
200200
cardTrailImage?: string,
201-
isLoopVideoLoadTest?: boolean,
202201
): MainMedia | undefined => {
203202
if (mediaAtom) {
204-
205-
const m3u8MimeType = [
203+
const m3u8MimeType = [
206204
'application/vnd.apple.mpegurl',
207205
'application/x-mpegURL',
208206
];
209-
const assets = mediaAtom.assets
210-
.filter((_) => !m3u8MimeType.includes(_.mimeType ?? ''))
211-
.filter(({ version }) => version === mediaAtom.activeVersion);
207+
const assets = mediaAtom.assets
208+
.filter((_) => !m3u8MimeType.includes(_.mimeType ?? ''))
209+
.filter(({ version }) => version === mediaAtom.activeVersion);
212210

213211
const videoAssets = assets.filter(
214212
({ assetType }) => assetType === 'Video',
@@ -294,17 +292,11 @@ const decideMedia = (
294292
imageHide?: boolean,
295293
videoReplace?: boolean,
296294
cardImage?: string,
297-
isLoopVideoLoadTest?: boolean,
298295
): MainMedia | undefined => {
299296
// If the showVideo toggle is enabled in the fronts tool,
300297
// we should return the active mediaAtom regardless of the design
301298
if (!!showMainVideo || !!videoReplace) {
302-
return getActiveMediaAtom(
303-
!!videoReplace,
304-
mediaAtom,
305-
cardImage,
306-
isLoopVideoLoadTest,
307-
);
299+
return getActiveMediaAtom(!!videoReplace, mediaAtom, cardImage);
308300
}
309301

310302
switch (format.design) {
@@ -319,12 +311,7 @@ const decideMedia = (
319311
};
320312

321313
case ArticleDesign.Video: {
322-
return getActiveMediaAtom(
323-
false,
324-
mediaAtom,
325-
cardImage,
326-
isLoopVideoLoadTest,
327-
);
314+
return getActiveMediaAtom(false, mediaAtom, cardImage);
328315
}
329316

330317
default:
@@ -341,7 +328,6 @@ export const enhanceCards = (
341328
pageId,
342329
discussionApiUrl,
343330
stripBranding = false,
344-
isLoopVideoLoadTest,
345331
}: {
346332
cardInTagPage: boolean;
347333
/** Used for the data link name to indicate card position in container */
@@ -351,7 +337,6 @@ export const enhanceCards = (
351337
discussionApiUrl: string;
352338
/** We strip branding from cards if the branding will appear at the collection level instead */
353339
stripBranding?: boolean;
354-
isLoopVideoLoadTest?: boolean;
355340
},
356341
): DCRFrontCard[] =>
357342
collections.map((faciaCard, index) => {
@@ -407,7 +392,6 @@ export const enhanceCards = (
407392
faciaCard.display.imageHide,
408393
faciaCard.properties.mediaSelect?.videoReplace,
409394
imageSrc,
410-
isLoopVideoLoadTest,
411395
);
412396

413397
return {

dotcom-rendering/src/model/enhanceCollections.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export const enhanceCollections = ({
6565
frontBranding,
6666
onPageDescription,
6767
isOnPaidContentFront,
68-
isLoopVideoLoadTest,
6968
}: {
7069
collections: FECollection[];
7170
editionId: EditionId;
@@ -74,7 +73,6 @@ export const enhanceCollections = ({
7473
frontBranding: Branding | undefined;
7574
onPageDescription?: string;
7675
isOnPaidContentFront?: boolean;
77-
isLoopVideoLoadTest?: boolean;
7876
}): DCRCollectionType[] => {
7977
const indexToShowFrontBranding =
8078
findCollectionSuitableForFrontBranding(collections);
@@ -135,21 +133,18 @@ export const enhanceCollections = ({
135133
editionId,
136134
discussionApiUrl,
137135
stripBrandingFromCards,
138-
isLoopVideoLoadTest,
139136
),
140137
curated: enhanceCards(collection.curated, {
141138
cardInTagPage: false,
142139
editionId,
143140
discussionApiUrl,
144141
stripBranding: stripBrandingFromCards,
145-
isLoopVideoLoadTest,
146142
}),
147143
backfill: enhanceCards(collection.backfill, {
148144
cardInTagPage: false,
149145
editionId,
150146
discussionApiUrl,
151147
stripBranding: stripBrandingFromCards,
152-
isLoopVideoLoadTest,
153148
}),
154149
treats: enhanceTreats(
155150
collection.treats,

dotcom-rendering/src/model/groupCards.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const groupCards = (
3232
editionId: EditionId,
3333
discussionApiUrl: string,
3434
stripBranding: boolean = false,
35-
isLoopVideoLoadTest?: boolean,
3635
): DCRGroupedTrails => {
3736
switch (container) {
3837
case 'dynamic/fast':
@@ -97,7 +96,6 @@ export const groupCards = (
9796
discussionApiUrl,
9897
offset,
9998
stripBranding,
100-
isLoopVideoLoadTest,
10199
});
102100

103101
return {
@@ -124,7 +122,6 @@ export const groupCards = (
124122
discussionApiUrl,
125123
offset,
126124
stripBranding,
127-
isLoopVideoLoadTest,
128125
});
129126

130127
return {

dotcom-rendering/src/server/handler.front.web.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ const enhanceFront = (body: unknown): Front => {
4545
.editionBrandings,
4646
data.editionId,
4747
),
48-
isLoopVideoLoadTest:
49-
data.config.abTests.LoopVideoLoadVariant === 'variant',
5048
}),
5149
},
5250
mostViewed: data.mostViewed.map((trail) => decideTrail(trail)),

0 commit comments

Comments
 (0)