import React from "react"; interface StreamItem { id: number; title: string; streamer: string; viewers: number; thumbnail?: string; } interface ListEntryProps { stream: StreamItem; onClick?: () => void; } interface ListRowProps { title: string; description: string; streams: StreamItem[]; onStreamClick?: (streamId: string) => void; } // Individual stream entry component const ListEntry: React.FC = ({ stream, onClick }) => { return (
{stream.thumbnail ? ( {stream.title} ) : (
)}

{stream.title}

{stream.streamer}

{stream.viewers} viewers

); }; // Row of stream entries const ListRow: React.FC = ({ title, description, streams, onStreamClick, }) => { return (

{title}

{description}

{streams.map((stream) => ( onStreamClick?.(stream.id)} /> ))}
); }; export default ListRow;