Skip to content

Commit 2392623

Browse files
Add most viewed footer to galleries
1 parent 906b0f2 commit 2392623

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

dotcom-rendering/src/layouts/GalleryLayout.tsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import { Island } from '../components/Island';
2626
import { LabsHeader } from '../components/LabsHeader';
2727
import { MainMediaGallery } from '../components/MainMediaGallery';
2828
import { Masthead } from '../components/Masthead/Masthead';
29+
import { MostViewedFooterData } from '../components/MostViewedFooterData.importable';
30+
import { MostViewedFooterLayout } from '../components/MostViewedFooterLayout';
2931
import { Section } from '../components/Section';
3032
import { Standfirst } from '../components/Standfirst';
3133
import { StickyBottomBanner } from '../components/StickyBottomBanner.importable';
@@ -436,7 +438,30 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
436438
/>
437439
</Section>
438440
)}
439-
{/** Most Popular container goes here */}
441+
{!frontendData.pageType.isPaidContent && (
442+
<Section
443+
title="Most viewed"
444+
padContent={false}
445+
verticalMargins={false}
446+
element="aside"
447+
data-link-name="most-popular"
448+
data-component="most-popular"
449+
backgroundColour={palette('--article-section-background')}
450+
borderColour={palette('--article-border')}
451+
fontColour={palette('--article-section-title')}
452+
>
453+
<MostViewedFooterLayout renderAds={isWeb && renderAds}>
454+
<Island priority="feature" defer={{ until: 'visible' }}>
455+
<MostViewedFooterData
456+
sectionId={frontendData.config.section}
457+
ajaxUrl={frontendData.config.ajaxUrl}
458+
edition={frontendData.editionId}
459+
/>
460+
</Island>
461+
</MostViewedFooterLayout>
462+
</Section>
463+
)}
464+
440465
{isWeb && renderAds && !isLabs && (
441466
<Section
442467
fullWidth={true}

0 commit comments

Comments
 (0)