'use client' import type { AlertItem, Topic, Stats } from './types' import { getScoreBadge } from './useAlertsData' interface DashboardTabProps { stats: Stats | null topics: Topic[] alerts: AlertItem[] error: string | null } export default function DashboardTab({ stats, topics, alerts, error }: DashboardTabProps) { return (
{/* Stats Grid */}
{stats?.total_alerts || 0}
Alerts gesamt
{stats?.new_alerts || 0}
Neue Alerts
{stats?.kept_alerts || 0}
Relevant
{stats?.review_alerts || 0}
Zur Pruefung
{/* Quick Actions */}

Aktive Topics

{topics.slice(0, 5).map((topic) => (
{topic.name}
{topic.alert_count} Alerts
{topic.is_active ? 'Aktiv' : 'Pausiert'}
))}

Letzte Alerts

{alerts.slice(0, 5).map((alert) => (
{alert.title}
{alert.topic_name} {getScoreBadge(alert.relevance_score)}
))}
{error && (

Hinweis: API nicht erreichbar. Demo-Daten werden angezeigt.

)}
) }