mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-23 17:34:44 +02:00
fix: activity word spacing (#5614)
This commit is contained in:
@@ -12,12 +12,14 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) {
|
|||||||
<>
|
<>
|
||||||
{firstThreeTopics.map((topicTitle, index) => {
|
{firstThreeTopics.map((topicTitle, index) => {
|
||||||
return (
|
return (
|
||||||
<span className="font-medium">
|
<span className="font-medium" key={`topic-${topicTitle}-${index}`}>
|
||||||
<>
|
<>
|
||||||
{index > 0 && ', '}
|
{index > 0 && ', '}
|
||||||
{index === firstThreeTopics.length - 1 &&
|
{index === firstThreeTopics.length - 1 &&
|
||||||
firstThreeTopics.length > 1 &&
|
remainingTopics?.length === 0 &&
|
||||||
'and '}
|
firstThreeTopics.length > 1
|
||||||
|
? 'and '
|
||||||
|
: ''}
|
||||||
{topicTitle}
|
{topicTitle}
|
||||||
</>
|
</>
|
||||||
</span>
|
</span>
|
||||||
@@ -26,7 +28,7 @@ export function ActivityTopicTitles(props: ActivityTopicTitlesProps) {
|
|||||||
|
|
||||||
{remainingTopics?.length > 0 && (
|
{remainingTopics?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
and
|
, and
|
||||||
<button
|
<button
|
||||||
className="font-medium underline underline-offset-2 hover:text-black"
|
className="font-medium underline underline-offset-2 hover:text-black"
|
||||||
onClick={onSelectActivity}
|
onClick={onSelectActivity}
|
||||||
|
@@ -67,7 +67,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
|
|||||||
src={userAvatar}
|
src={userAvatar}
|
||||||
alt={user.name}
|
alt={user.name}
|
||||||
/>
|
/>
|
||||||
<span className="font-medium">{user?.name || 'Unknown'}</span>{' '}
|
<span className="font-medium">{user?.name || 'Unknown'}</span>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -79,33 +79,35 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
|
|||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={user._id}
|
key={user._id}
|
||||||
className="flex flex-wrap items-center gap-1 rounded-md border px-2 py-2.5 text-sm"
|
className="flex flex-wrap items-center gap-y-1 rounded-md border px-2 py-2.5 text-sm"
|
||||||
>
|
>
|
||||||
{actionType === 'in_progress' && (
|
{actionType === 'in_progress' && (
|
||||||
<>
|
<>
|
||||||
{username} started{' '}
|
{username} started
|
||||||
<ActivityTopicTitles
|
<ActivityTopicTitles
|
||||||
topicTitles={topicTitles || []}
|
topicTitles={topicTitles || []}
|
||||||
onSelectActivity={() => onTopicClick?.(activity)}
|
onSelectActivity={() => onTopicClick?.(activity)}
|
||||||
/>{' '}
|
/>
|
||||||
in {resourceLink(activity)} {timeAgo(activity.updatedAt)}
|
in {resourceLink(activity)}
|
||||||
|
{timeAgo(activity.updatedAt)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{actionType === 'done' && (
|
{actionType === 'done' && (
|
||||||
<>
|
<>
|
||||||
{username} completed{' '}
|
{username} completed
|
||||||
<ActivityTopicTitles
|
<ActivityTopicTitles
|
||||||
topicTitles={topicTitles || []}
|
topicTitles={topicTitles || []}
|
||||||
onSelectActivity={() => onTopicClick?.(activity)}
|
onSelectActivity={() => onTopicClick?.(activity)}
|
||||||
/>{' '}
|
/>
|
||||||
in {resourceLink(activity)} {timeAgo(activity.updatedAt)}
|
in {resourceLink(activity)}
|
||||||
|
{timeAgo(activity.updatedAt)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{actionType === 'answered' && (
|
{actionType === 'answered' && (
|
||||||
<>
|
<>
|
||||||
{username} answered {topicCount} question
|
{username} answered {topicCount} question
|
||||||
{topicCount > 1 ? 's' : ''} in {resourceLink(activity)}{' '}
|
{topicCount > 1 ? 's' : ''} in {resourceLink(activity)}
|
||||||
{timeAgo(activity.updatedAt)}
|
{timeAgo(activity.updatedAt)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user