import { Clock } from 'lucide-react' import { useNavigate } from 'react-router-dom' import { ActivityItem } from './ActivityItem' import type { SidebarActiveSession, SidebarRecentSession } from '@/api/sidebar' interface SidebarActivityFeedProps { activeSessions: SidebarActiveSession[] recentCompletions: SidebarRecentSession[] totalActive: number } export function SidebarActivityFeed({ activeSessions, recentCompletions, totalActive, }: SidebarActivityFeedProps) { const navigate = useNavigate() const hasActivity = activeSessions.length > 0 || recentCompletions.length > 0 return (
{/* Header */}
Activity
{!hasActivity ? (

No activity today

) : (
{/* Active sessions */} {activeSessions.map((session) => ( ))} {/* Overflow link */} {totalActive > 5 && ( )} {/* Divider between active and recent */} {activeSessions.length > 0 && recentCompletions.length > 0 && (
)} {/* Recent completions */} {recentCompletions.map((session) => ( ))}
)}
) }