import { Badge } from "../atoms"; import type { ActivityEvent } from "../../types"; interface Props { event: ActivityEvent; } const typeColors: Record = { navigate: "info", snapshot: "success", action: "warning", screenshot: "default", other: "default", }; const typeIcons: Record = { navigate: "🧭", snapshot: "📸", action: "👆", screenshot: "🖼️", other: "📝", }; function formatTime(ts: string): string { return new Date(ts).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit", second: "2-digit", }); } export default function ActivityLine({ event }: Props) { return (
{typeIcons[event.type] || "📝"} {formatTime(event.timestamp)} {event.method} {event.path} {event.agentId}
); }