Skip to content

Commit

Permalink
revert temporary changes to highlight ad slots in DecideFrontsAdSlots
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 committed Jan 8, 2025
1 parent 571a268 commit d6ec7e2
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions dotcom-rendering/src/components/DecideFrontsAdSlots.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import { css } from '@emotion/react';
import { Hide } from '@guardian/source/react-components';
import type { ReactNode } from 'react';
import { getMerchHighPosition } from '../lib/getFrontsAdPositions';
import { palette as themePalette } from '../palette';
import { AdSlot } from './AdSlot.web';
import { Section } from './Section';

/** !!! DO NOT MERGE TO MAIN! !!! */
const tempHighlighting = (colour: string) => css`
border: 4px solid ${colour};
`;

export const decideMerchHighAndMobileAdSlots = (
renderAds: boolean,
index: number,
Expand All @@ -30,28 +24,22 @@ export const decideMerchHighAndMobileAdSlots = (
if (shouldInsertMerchHighSlot) {
return (
<Hide from="desktop">
<div css={tempHighlighting('orange')}>
{index}
<AdSlot
data-print-layout="hide"
position="merchandising-high"
/>
</div>
<AdSlot
data-print-layout="hide"
position="merchandising-high"
/>
</Hide>
);
}

if (mobileAdPositions.includes(index)) {
return (
<Hide from="tablet">
<div css={tempHighlighting('red')}>
{index}
<AdSlot
index={mobileAdPositions.indexOf(index)}
data-print-layout="hide"
position="mobile-front"
/>
</div>
<AdSlot
index={mobileAdPositions.indexOf(index)}
data-print-layout="hide"
position="mobile-front"
/>
</Hide>
);
}
Expand Down

0 comments on commit d6ec7e2

Please sign in to comment.