import { useNavigate } from "react-router-dom"; import { Radio } from "lucide-react"; import { Progress } from "@/components/ui/progress"; import type { StreamParticle } from "@/hooks/use-stream-particles"; import { StreamCard } from "@/features/particles/stream-card"; import { StreamContextMenu } from "@/features/particles/stream-context-menu"; interface ParticleGridViewProps { streams: StreamParticle[]; networkId: string; isLoading: boolean; selectedIndex?: number | null; } export function ParticleGridView({ streams, networkId, isLoading, selectedIndex }: ParticleGridViewProps) { const navigate = useNavigate(); if (isLoading) { return ; } if (streams.length === 0) { return (

No recent streams yet. Start a conversation using the keyboard shortcuts below.

); } return (
{streams.map((stream, index) => ( el?.scrollIntoView({ block: "nearest" }) : undefined} particle={stream} networkId={networkId} onClick={() => navigate(`/${networkId}/${stream.id}`)} isSelected={index === selectedIndex} shortcutKey={index < 9 ? index + 1 : undefined} /> ))}
); }