From 89c6b3609007119a4e21ef1ed951404f640e918c Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Wed, 8 May 2024 05:07:23 +0600 Subject: [PATCH] fix: activity word spacing (#5614) --- .../Activity/ActivityTopicTitles.tsx | 10 +++++---- .../TeamActivity/TeamActivityItem.tsx | 22 ++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/Activity/ActivityTopicTitles.tsx b/src/components/Activity/ActivityTopicTitles.tsx index 94ea1f1cd..89337c7a7 100644 --- a/src/components/Activity/ActivityTopicTitles.tsx +++ b/src/components/Activity/ActivityTopicTitles.tsx @@ -12,12 +12,14 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) { <> {firstThreeTopics.map((topicTitle, index) => { return ( - + <> {index > 0 && ', '} {index === firstThreeTopics.length - 1 && - firstThreeTopics.length > 1 && - 'and '} + remainingTopics?.length === 0 && + firstThreeTopics.length > 1 + ? 'and ' + : ''} {topicTitle} @@ -26,7 +28,7 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) { {remainingTopics?.length > 0 && ( <> -  and  + , and