Skip to content

Commit c2ee17d

Browse files
committed
Add Hide from source components instead of DCRand polish PR
1 parent 18f1e74 commit c2ee17d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

dotcom-rendering/src/components/AdSlot.web.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ export const AdSlot = ({
951951
data-name={advertId}
952952
aria-hidden="true"
953953
data-label-show="true"
954-
data-testid="slot" //doesn't exist in Frontend so do we need it in DCR?
954+
data-testid="slot"
955955
/>
956956
</AdSlotWrapper>
957957
);

dotcom-rendering/src/layouts/GalleryLayout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
palette as sourcePalette,
66
space,
77
} from '@guardian/source/foundations';
8+
import { Hide } from '@guardian/source/react-components';
89
import { Fragment } from 'react';
910
import { AdSlot } from '../components/AdSlot.web';
1011
import { AppsFooter } from '../components/AppsFooter.importable';
@@ -17,7 +18,6 @@ import { Footer } from '../components/Footer';
1718
import { DesktopAdSlot, MobileAdSlot } from '../components/GalleryAdSlots';
1819
import { GalleryImage } from '../components/GalleryImage';
1920
import { HeaderAdSlot } from '../components/HeaderAdSlot';
20-
import { Hide } from '../components/Hide';
2121
import { Island } from '../components/Island';
2222
import { MainMediaGallery } from '../components/MainMediaGallery';
2323
import { Masthead } from '../components/Masthead/Masthead';
@@ -278,15 +278,15 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
278278
{isWeb && shouldShowAds && (
279279
<div css={galleryItemAdvertStyles}>
280280
<div css={galleryInlineAdContainerStyles}>
281-
<Hide when="below" breakpoint="tablet">
281+
<Hide until="tablet">
282282
<DesktopAdSlot
283283
renderAds={renderAds}
284284
adSlotIndex={adPositions.indexOf(
285285
index,
286286
)}
287287
/>
288288
</Hide>
289-
<Hide when="above" breakpoint="tablet">
289+
<Hide from="tablet">
290290
<MobileAdSlot
291291
renderAds={renderAds}
292292
adSlotIndex={adPositions.indexOf(
@@ -331,6 +331,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
331331
/>
332332
</Section>
333333
)}
334+
{/** Most Popular container goes here */}
334335
{isWeb && renderAds && !isLabs && (
335336
<Section
336337
fullWidth={true}

0 commit comments

Comments
 (0)