diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx index 7443cd065d..f5b444c240 100644 --- a/src/view/com/notifications/FeedItem.tsx +++ b/src/view/com/notifications/FeedItem.tsx @@ -169,7 +169,6 @@ let FeedItem = ({ ) let action: ReactElement - let actionPlural: ReactElement let icon = ( {author} liked your post - actionPlural = ( - - {author} and{' '} - - - {' '} - liked your post - - ) + action = + authors.length > 1 ? ( + + {author} and{' '} + + + {' '} + liked your post + + ) : ( + {author} liked your post + ) } else if (item.type === 'repost') { - action = {author} reposted your post - actionPlural = ( - - {author} and{' '} - - - {' '} - reposted your post - - ) + action = + authors.length > 1 ? ( + + {author} and{' '} + + + {' '} + reposted your post + + ) : ( + {author} reposted your post + ) icon = } else if (item.type === 'follow') { - action = {author} followed you - actionPlural = ( - - {author} and{' '} - - - {' '} - followed you - - ) + action = + authors.length > 1 ? ( + + {author} and{' '} + + + {' '} + followed you + + ) : ( + {author} followed you + ) icon = } else if (item.type === 'feedgen-like') { - action = {author} liked your custom feed - actionPlural = ( - - {author} and{' '} - - - {' '} - liked your custom feed - - ) + action = + authors.length > 1 ? ( + + {author} and{' '} + + + {' '} + liked your custom feed + + ) : ( + {author} liked your custom feed + ) } else { return null } @@ -309,7 +316,7 @@ let FeedItem = ({ /> - {authors.length > 1 ? actionPlural : action} + {action} {({timeElapsed}) => (