Skip to content

Commit 2eec092

Browse files
committed
Fix keys in Flexible General
1 parent 456bb92 commit 2eec092

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const ImmersiveCardLayout = ({
104104
const isLoopingVideo = card.mainMedia?.type === 'LoopVideo';
105105

106106
return (
107-
<UL padBottom={true} key={card.url}>
107+
<UL padBottom={true}>
108108
<LI padSides={true}>
109109
<FeatureCard
110110
collectionId={collectionId}
@@ -442,7 +442,6 @@ const FullWidthCardLayout = ({
442442
showTopBar={!isFirstRow}
443443
padBottom={!isLastRow}
444444
hasLargeSpacing={!isLastRow}
445-
key={card.url}
446445
>
447446
<LI
448447
padSides={true}
@@ -496,7 +495,6 @@ type HalfWidthCardLayoutProps = {
496495
showAge?: boolean;
497496
absoluteServerTimes: boolean;
498497
aspectRatio: AspectRatio;
499-
row: number;
500498
isLastRow: boolean;
501499
containerLevel: DCRContainerLevel;
502500
};
@@ -510,7 +508,6 @@ const HalfWidthCardLayout = ({
510508
isFirstRow,
511509
isFirstStandardRow,
512510
aspectRatio,
513-
row,
514511
isLastRow,
515512
containerLevel,
516513
}: HalfWidthCardLayoutProps) => {
@@ -524,7 +521,6 @@ const HalfWidthCardLayout = ({
524521
showTopBar={!isFirstRow}
525522
/** We use one full top bar for the first row and use a split one for subsequent rows */
526523
splitTopBar={!isFirstStandardRow}
527-
key={row}
528524
>
529525
{cards.map((card, cardIndex) => {
530526
return (
@@ -628,6 +624,7 @@ export const FlexibleGeneral = ({
628624
isLastRow={i === groupedCards.length - 1}
629625
containerLevel={containerLevel}
630626
collectionId={collectionId}
627+
key={row.cards[0]?.uniqueId}
631628
/>
632629
);
633630

@@ -644,9 +641,9 @@ export const FlexibleGeneral = ({
644641
isFirstRow={!splash.length && i === 0}
645642
isFirstStandardRow={i === 0}
646643
aspectRatio={aspectRatio}
647-
row={i + 1}
648644
isLastRow={i === groupedCards.length - 1}
649645
containerLevel={containerLevel}
646+
key={row.cards[0]?.uniqueId}
650647
/>
651648
);
652649
}

0 commit comments

Comments
 (0)