Skip to content

Commit 628edaa

Browse files
Update CrosswordLayout.tsx
1 parent 96b7c73 commit 628edaa

File tree

1 file changed

+79
-56
lines changed

1 file changed

+79
-56
lines changed

dotcom-rendering/src/layouts/CrosswordLayout.tsx

Lines changed: 79 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -267,66 +267,89 @@ export const CrosswordLayout = (props: Props) => {
267267
/>
268268
</GridItem>
269269
)}
270-
<GridItem area="body" element="article">
271-
<ArticleContainer format={format}>
272-
<ArticleBody
273-
format={format}
274-
blocks={article.blocks}
275-
host={host}
276-
pageId={article.pageId}
277-
webTitle={article.webTitle}
278-
ajaxUrl={article.config.ajaxUrl}
279-
abTests={article.config.abTests}
280-
switches={article.config.switches}
281-
isSensitive={article.config.isSensitive}
282-
isAdFreeUser={article.isAdFreeUser}
283-
sectionId={article.config.section}
284-
shouldHideReaderRevenue={
285-
article.shouldHideReaderRevenue
286-
}
287-
tags={article.tags}
288-
isPaidContent={
289-
!!article.config.isPaidContent
290-
}
291-
contributionsServiceUrl={
292-
contributionsServiceUrl
293-
}
294-
contentType={article.contentType}
295-
isPreview={article.config.isPreview}
296-
idUrl={article.config.idUrl ?? ''}
297-
isDev={!!article.config.isDev}
298-
keywordIds={article.config.keywordIds}
299-
tableOfContents={
300-
article.tableOfContents
301-
}
302-
lang={article.lang}
303-
isRightToLeftLang={
304-
article.isRightToLeftLang
305-
}
306-
editionId={article.editionId}
307-
/>
308-
</ArticleContainer>
309-
</GridItem>
310-
<GridItem area="right-column">
311-
<RightColumn showFrom="wide">
312-
<div
313-
css={css`
314-
margin-top: ${remSpace[3]};
315-
`}
316-
>
317-
{renderAds ? (
318-
<AdSlot
319-
position="right"
320-
display={format.display}
321-
isPaidContent={isPaidContent}
270+
{Boolean(article.crossword?.entries.length) && (
271+
<>
272+
<GridItem area="body" element="article">
273+
<ArticleContainer format={format}>
274+
<ArticleBody
275+
format={format}
276+
blocks={article.blocks}
277+
host={host}
278+
pageId={article.pageId}
279+
webTitle={article.webTitle}
280+
ajaxUrl={article.config.ajaxUrl}
281+
abTests={article.config.abTests}
282+
switches={
283+
article.config.switches
284+
}
285+
isSensitive={
286+
article.config.isSensitive
287+
}
288+
isAdFreeUser={
289+
article.isAdFreeUser
290+
}
291+
sectionId={
292+
article.config.section
293+
}
322294
shouldHideReaderRevenue={
323295
article.shouldHideReaderRevenue
324296
}
297+
tags={article.tags}
298+
isPaidContent={
299+
!!article.config
300+
.isPaidContent
301+
}
302+
contributionsServiceUrl={
303+
contributionsServiceUrl
304+
}
305+
contentType={
306+
article.contentType
307+
}
308+
isPreview={
309+
article.config.isPreview
310+
}
311+
idUrl={
312+
article.config.idUrl ?? ''
313+
}
314+
isDev={!!article.config.isDev}
315+
keywordIds={
316+
article.config.keywordIds
317+
}
318+
tableOfContents={
319+
article.tableOfContents
320+
}
321+
lang={article.lang}
322+
isRightToLeftLang={
323+
article.isRightToLeftLang
324+
}
325+
editionId={article.editionId}
325326
/>
326-
) : null}
327-
</div>
328-
</RightColumn>
329-
</GridItem>
327+
</ArticleContainer>
328+
</GridItem>
329+
<GridItem area="right-column">
330+
<RightColumn showFrom="wide">
331+
<div
332+
css={css`
333+
margin-top: ${remSpace[3]};
334+
`}
335+
>
336+
{renderAds ? (
337+
<AdSlot
338+
position="right"
339+
display={format.display}
340+
isPaidContent={
341+
isPaidContent
342+
}
343+
shouldHideReaderRevenue={
344+
article.shouldHideReaderRevenue
345+
}
346+
/>
347+
) : null}
348+
</div>
349+
</RightColumn>
350+
</GridItem>
351+
</>
352+
)}
330353
</CrosswordGrid>
331354
</div>
332355
</Section>

0 commit comments

Comments
 (0)