@@ -225,7 +225,6 @@ export const OnwardsUpper = ({
225225 webURL,
226226} : Props ) => {
227227 const isHorizontalScrollingSupported = useIsHorizontalScrollingSupported ( ) ;
228-
229228 if ( ! isHorizontalScrollingSupported ) return null ;
230229
231230 // Related content can be a collection of articles based on
@@ -234,7 +233,7 @@ export const OnwardsUpper = ({
234233
235234 // In this context, Blog tags are treated the same as Series tags
236235 const seriesTag = tags . find (
237- ( tag ) => tag . type === 'Series' || tag . type === 'Blog' ,
236+ ( { type } ) => type === 'Series' || type === 'Blog' ,
238237 ) ;
239238
240239 let url : string | undefined ;
@@ -317,21 +316,17 @@ export const OnwardsUpper = ({
317316 const showCuratedContainer =
318317 ! ! curatedDataUrl && ! isPaidContent && canHaveCuratedContent ;
319318
319+ const isGalleryArticle = format . design === ArticleDesign . Gallery ;
320+
320321 return (
321322 < div css = { onwardsWrapper } >
322323 { ! ! url && (
323324 < Section
324325 fullWidth = { true }
325326 borderColour = { palette ( '--article-section-border' ) }
326- padSides = {
327- format . design === ArticleDesign . Gallery ? false : true
328- }
329- showTopBorder = {
330- format . design === ArticleDesign . Gallery ? false : true
331- }
332- showSideBorders = {
333- format . design === ArticleDesign . Gallery ? false : true
334- }
327+ padSides = { ! isGalleryArticle }
328+ showTopBorder = { ! isGalleryArticle }
329+ showSideBorders = { ! isGalleryArticle }
335330 >
336331 < FetchOnwardsData
337332 url = { url }
@@ -342,7 +337,7 @@ export const OnwardsUpper = ({
342337 serverTime = { serverTime }
343338 renderingTarget = { renderingTarget }
344339 isAdFreeUser = { isAdFreeUser }
345- containerPosition = { ' first' }
340+ containerPosition = " first"
346341 webURL = { webURL }
347342 />
348343 </ Section >
@@ -351,15 +346,9 @@ export const OnwardsUpper = ({
351346 < Section
352347 fullWidth = { true }
353348 borderColour = { palette ( '--article-section-border' ) }
354- showTopBorder = {
355- format . design === ArticleDesign . Gallery ? false : true
356- }
357- showSideBorders = {
358- format . design === ArticleDesign . Gallery ? false : true
359- }
360- padSides = {
361- format . design === ArticleDesign . Gallery ? false : true
362- }
349+ showTopBorder = { ! isGalleryArticle }
350+ showSideBorders = { ! isGalleryArticle }
351+ padSides = { ! isGalleryArticle }
363352 >
364353 < FetchOnwardsData
365354 url = { curatedDataUrl }
0 commit comments