import { TorrentId } from "../api-types"; import { Spinner } from "./Spinner"; import { Torrent } from "./Torrent"; export const TorrentsList = (props: { torrents: Array | null; loading: boolean; }) => { return (
{props.torrents === null ? ( props.loading ? ( ) : null ) : props.torrents.length === 0 ? (

No existing torrents found.

) : ( props.torrents.map((t: TorrentId) => ( <> )) )}
); };