import { motion } from "framer-motion"; import { GitCommit, GitPullRequest, GitFork, Star, User, Clock } from "lucide-react"; interface Activity { id: string; type: "commit" | "pr" | "fork" | "star" | "user"; user: string; action: string; target: string; time: string; } interface Props { activities?: Activity[]; } const activityIcons = { commit: { icon: GitCommit, color: "text-green-400", bg: "bg-green-500/10" }, pr: { icon: GitPullRequest, color: "text-blue-400", bg: "bg-blue-500/10" }, fork: { icon: GitFork, color: "text-purple-400", bg: "bg-purple-500/10" }, star: { icon: Star, color: "text-yellow-400", bg: "bg-yellow-500/10" }, user: { icon: User, color: "text-cyan-400", bg: "bg-cyan-500/10" } }; // Use real activities from API only export default function RecentActivity({ activities = [] }: Props) { if (activities.length === 0) { return (

Recent Activity

No recent activity
); } return (

Recent Activity

{activities.slice(0, 4).map((activity, i) => { const { icon: Icon, color, bg } = activityIcons[activity.type]; return ( {/* Icon */}
{/* Content */}
{activity.user} {activity.action} {activity.target}
{activity.time}
{/* Line connector */} {i < activities.length - 1 && (
)} ); })}
); }