From e025a73d21e83b382e41fed04f669355859a1563 Mon Sep 17 00:00:00 2001 From: gitwoz <177856586+gitwoz@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:52:47 +0700 Subject: [PATCH] fix(campaign): show featured label for stage feeds --- .../ArticleFeeds/MainFeed/index.tsx | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/src/views/CampaignDetail/ArticleFeeds/MainFeed/index.tsx b/src/views/CampaignDetail/ArticleFeeds/MainFeed/index.tsx index 14d1cb9802..148a6de4f2 100644 --- a/src/views/CampaignDetail/ArticleFeeds/MainFeed/index.tsx +++ b/src/views/CampaignDetail/ArticleFeeds/MainFeed/index.tsx @@ -65,6 +65,17 @@ const getArticleStageName = ( ] } +const FeaturedLabel = () => ( + } + spacing={2} + color="freeWriteGreenLabel" + size={12} + > + + +) + const MainFeed = ({ feedType, camapign }: MainFeedProps) => { const viewer = useContext(ViewerContext) const { lang } = useContext(LanguageContext) @@ -212,8 +223,8 @@ const MainFeed = ({ feedType, camapign }: MainFeedProps) => { + <> + {(isAll || isFeatured) && ( { > {getArticleStageName(node, lang)} - - {isAll && featured && ( - - } - spacing={2} - color="freeWriteGreenLabel" - size={12} - > - - - )} - - ) + )} + {!isFeatured && featured && } + } onClick={() => { analytics.trackEvent('click_feed', {