Skip to content
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
36 changes: 35 additions & 1 deletion dotcom-rendering/src/layouts/GalleryLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ArticleMetaApps } from '../components/ArticleMeta.apps';
import { ArticleMeta } from '../components/ArticleMeta.web';
import { ArticleTitle } from '../components/ArticleTitle';
import { Caption } from '../components/Caption';
import { DiscussionLayout } from '../components/DiscussionLayout';
import { Footer } from '../components/Footer';
import { DesktopAdSlot, MobileAdSlot } from '../components/GalleryAdSlots';
import { GalleryImage } from '../components/GalleryImage';
Expand Down Expand Up @@ -172,6 +173,9 @@ export const GalleryLayout = (props: WebProps | AppProps) => {

const contributionsServiceUrl = getContributionsServiceUrl(frontendData);

const showComments =
frontendData.isCommentable && !frontendData.config.isPaidContent;

return (
<>
{isWeb && (
Expand Down Expand Up @@ -361,7 +365,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
</Fragment>
);
})}
;

<SubMeta
format={format}
subMetaKeywordLinks={frontendData.subMetaKeywordLinks}
Expand Down Expand Up @@ -391,6 +395,36 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
/>
</Section>
)}
{/** More Galleries container goes here */}
{showComments && (
<Section
fullWidth={true}
sectionId="comments"
element="section"
backgroundColour={themePalette(
'--discussion-section-background',
)}
borderColour={themePalette('--article-border')}
fontColour={themePalette('--discussion-text')}
>
<DiscussionLayout
discussionApiUrl={frontendData.config.discussionApiUrl}
shortUrlId={frontendData.config.shortUrlId}
format={format}
discussionD2Uid={frontendData.config.discussionD2Uid}
discussionApiClientHeader={
frontendData.config.discussionApiClientHeader
}
enableDiscussionSwitch={
!!frontendData.config.switches
.enableDiscussionSwitch
}
isAdFreeUser={frontendData.isAdFreeUser}
shouldHideAds={frontendData.shouldHideAds}
idApiUrl={frontendData.config.idApiUrl}
/>
</Section>
)}
{/** Most Popular container goes here */}
{isWeb && renderAds && !isLabs && (
<Section
Expand Down