diff --git a/src/components/Activity/ActivityTopicTitles.tsx b/src/components/Activity/ActivityTopicTitles.tsx index a5d7e70ad..94ea1f1cd 100644 --- a/src/components/Activity/ActivityTopicTitles.tsx +++ b/src/components/Activity/ActivityTopicTitles.tsx @@ -12,13 +12,13 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) { <> {firstThreeTopics.map((topicTitle, index) => { return ( - + <> - {topicTitles.length > 3 && index === 2 - ? `${topicTitle}, ` - : index === 2 - ? `and ${topicTitle}` - : `${topicTitle}, `} + {index > 0 && ', '} + {index === firstThreeTopics.length - 1 && + firstThreeTopics.length > 1 && + 'and '} + {topicTitle} ); @@ -26,7 +26,7 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) { {remainingTopics?.length > 0 && ( <> - and +  and