import { MessageSquare, Terminal } from "lucide-react"; import Link from "@/components/link"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; interface ChatMessage { id: number; roomId: number; timestamp: number; message: string; } interface CommandEntry { id: number; timestamp: number; command: string; params: string; succes: string; } interface UserActivityLogProps { chatLogs: ChatMessage[]; commandLogs: CommandEntry[]; } function formatTime(ts: number) { if (!ts) return "-"; const d = new Date(ts * 1000); return d.toLocaleString(undefined, { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit", }); } export function UserActivityLog({ chatLogs, commandLogs, }: UserActivityLogProps) { return (
No recent messages.
) : ({log.message}
No recent commands.
) : (
:{log.command}
{log.params}
)}