Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicated ContainerOverrides wrapper around FrontSection and LabsSection components #12931

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 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,16 +490,13 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</div>
);
}

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

Expand All @@ -560,10 +554,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 +626,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 +706,7 @@ export const FrontLayout = ({ front, NAV }: Props) => {
mobileAdPositions,
hasPageSkin,
)}
</ContainerOverrides>
</div>
);
})}
</main>
Expand Down
Loading