Skip to content

Commit

Permalink
remove container overrides wrapper for FrontSection and LabsSection c…
Browse files Browse the repository at this point in the history
…omponents

since these components have container overrides inside them so are currently being duplicated unnecessarily
  • Loading branch information
cemms1 committed Nov 29, 2024
1 parent c305fb9 commit e966c45
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions dotcom-rendering/src/layouts/FrontLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
: undefined;

return (
<ContainerOverrides
key={ophanName}
containerPalette={collection.containerPalette}
>
<div key={ophanName}>
{decideFrontsBannerAdSlot(
renderAds,
hasPageSkin,
Expand Down Expand Up @@ -493,17 +490,15 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</div>
);
}

if (collection.containerPalette === 'Branded') {
return (
<ContainerOverrides
key={ophanName}
containerPalette={collection.containerPalette}
>
<>
<LabsSection
key={ophanName}
title={collection.displayName}
collectionId={collection.id}
pageId={front.pressedPage.id}
Expand Down Expand Up @@ -548,7 +543,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</>
);
}

Expand All @@ -560,10 +555,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
collection.containerPalette ?? 'MediaPalette';

return (
<ContainerOverrides
key={ophanName}
containerPalette={containerPalette}
>
<div key={ophanName}>
{decideFrontsBannerAdSlot(
renderAds,
hasPageSkin,
Expand Down Expand Up @@ -635,15 +627,12 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</div>
);
}

return (
<ContainerOverrides
key={ophanName}
containerPalette={collection.containerPalette}
>
<div key={ophanName}>
{decideFrontsBannerAdSlot(
renderAds,
hasPageSkin,
Expand Down Expand Up @@ -718,7 +707,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</div>
);
})}
</main>
Expand Down

0 comments on commit e966c45

Please sign in to comment.