import { memo } from 'react'; import { SyncedLoader2 } from '@renderer/components/ui/SyncedLoader2'; import { formatTaskDisplayLabel } from '@shared/utils/taskIdentity'; import type { TeamTaskWithKanban } from '@shared/types'; interface CurrentTaskIndicatorProps { task: TeamTaskWithKanban; borderColor: string; maxSubjectLength?: number; activityLabel?: string; onOpenTask?: () => void; } /** * Inline indicator showing a spinning loader + "working on" + task label button. * Shared between MemberCard and MemberHoverCard. */ export const CurrentTaskIndicator = memo( ({ task, borderColor, maxSubjectLength, activityLabel = 'working on', onOpenTask, }: CurrentTaskIndicatorProps): React.JSX.Element => { const subjectText = typeof maxSubjectLength === 'number' && maxSubjectLength > 0 && task.subject.length > maxSubjectLength ? `${task.subject.slice(0, maxSubjectLength)}…` : task.subject; return (
{activityLabel}
); } ); CurrentTaskIndicator.displayName = 'CurrentTaskIndicator';