"use client"; import { ChannelFeed } from "@/types"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Skeleton } from "@/components/ui/skeleton"; import { Radio } from "lucide-react"; import { LiveFeedItem } from "./live-feed-item"; interface LiveFeedsPanelProps { feeds: ChannelFeed[] | undefined; isLoading: boolean; } export function LiveFeedsPanel({ feeds, isLoading }: LiveFeedsPanelProps) { const activeCount = (feeds ?? []).filter( (f) => f.status === "active" || f.message_count_24h > 0, ).length; return (
Live Feeds {activeCount} active
{isLoading ? (
{[...Array(5)].map((_, i) => ( ))}
) : !feeds || feeds.length === 0 ? (
No channel feeds available
) : (
{feeds.map((feed) => ( ))}
)}
); }