Files
Mana-Loop/src/components/game/tabs/ActivityLog.tsx
T
n8n-gitea afbdb71548
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m22s
fix: resolve Docker build errors - JSX ternary, missing barrel export, missing ActivityLog component
2026-05-18 15:07:34 +02:00

35 lines
837 B
TypeScript

import type { ActivityLogEntry } from '@/lib/game/types';
interface ActivityLogProps {
activityLog: ActivityLogEntry[];
maxEntries?: number;
}
export function ActivityLog({ activityLog, maxEntries = 20 }: ActivityLogProps) {
const entries = activityLog.slice(0, maxEntries);
if (entries.length === 0) {
return (
<div className="text-sm text-gray-500 italic p-2">
No activity yet.
</div>
);
}
return (
<div className="space-y-1 max-h-64 overflow-y-auto">
{entries.map((entry) => (
<div
key={entry.id}
className="text-xs text-gray-300 border-b border-gray-700 pb-1 last:border-0"
>
<span className="text-gray-500 mr-1">
[{entry.eventType}]
</span>
{entry.message}
</div>
))}
</div>
);
}