Skip to content

Commit

Permalink
Hide most viewed in right column on the AudioLayout.tsx (#12687)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverabrahams authored Oct 25, 2024
1 parent d22e3e0 commit c320dd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Props = {
isPaidContent: boolean;
renderAds: boolean;
shouldHideReaderRevenue: boolean;
shouldHideMostViewed?: boolean;
};

/**
Expand Down Expand Up @@ -41,6 +42,7 @@ export const MostViewedRightWithAd = ({
isPaidContent,
renderAds,
shouldHideReaderRevenue,
shouldHideMostViewed = false,
}: Props) => {
const componentDataAttribute = 'most-viewed-right-container';
const { renderingTarget } = useConfig();
Expand Down Expand Up @@ -75,7 +77,7 @@ export const MostViewedRightWithAd = ({
/>
) : null}

{!isPaidContent ? (
{!isPaidContent && !shouldHideMostViewed ? (
<MostViewedRightWrapper
maxHeightPx={MAX_HEIGHT_PX}
componentDataAttribute={componentDataAttribute}
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/layouts/AudioLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ export const AudioLayout = (props: WebProps) => {
!!article.config
.shouldHideReaderRevenue
}
shouldHideMostViewed={true}
/>
</Island>
</RightColumn>
Expand Down

0 comments on commit c320dd6

Please sign in to comment.