Skip to content

Commit

Permalink
Reinstate ArticlePage topics for Serbian and Zhongwen services (#12346)
Browse files Browse the repository at this point in the history
* Reinstate ArticlePage topics for variant services

* Revert "Reinstate ArticlePage topics for variant services"

This reverts commit d531a30.

* Still prevent Uzbek displaying topics

* Rename boolean to be clearer

* Better again
  • Loading branch information
amoore108 authored Jan 28, 2025
1 parent e8a8758 commit 33f0ec2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/app/pages/ArticlePage/ArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => {

const allowAdvertising = pageData?.metadata?.allowAdvertising ?? false;
const adcampaign = pageData?.metadata?.adCampaignKeyword;
const isTransliterated =
['serbian', 'zhongwen', 'uzbek'].includes(service) &&
pageType === ARTICLE_PAGE;
const isUzbekArticle = service === 'uzbek' && pageType === ARTICLE_PAGE;

const { enabled: podcastPromoEnabled } = useToggle('podcastPromo');
const headline = getHeadline(pageData) ?? '';
Expand Down Expand Up @@ -285,7 +283,7 @@ const ArticlePage = ({ pageData }: { pageData: Article }) => {
const promoImage = promoImageRawBlock?.model?.locator;

const showTopics = Boolean(
showRelatedTopics && topics.length > 0 && !isTransliterated,
showRelatedTopics && topics.length > 0 && !isUzbekArticle,
);

return (
Expand Down
6 changes: 2 additions & 4 deletions src/app/pages/MediaArticlePage/MediaArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ const MediaArticlePage = ({ pageData }: { pageData: Article }) => {
...(isCpsMap && { pageTitle: `${atiAnalytics.pageTitle} - ${brandName}` }),
};

const isTransliterated =
['serbian', 'zhongwen', 'uzbek'].includes(service) &&
pageType === ARTICLE_PAGE;
const isUzbekArticle = service === 'uzbek' && pageType === ARTICLE_PAGE;

const promoImageBlocks =
pageData?.promo?.images?.defaultPromoImage?.blocks ?? [];
Expand All @@ -208,7 +206,7 @@ const MediaArticlePage = ({ pageData }: { pageData: Article }) => {
const promoImage = promoImageRawBlock?.model?.locator;

const showTopics = Boolean(
showRelatedTopics && topics.length > 0 && !isTransliterated,
showRelatedTopics && topics.length > 0 && !isUzbekArticle,
);

const isLiveMedia = checkIsLiveMedia(blocks);
Expand Down

0 comments on commit 33f0ec2

Please sign in to comment.