import { Spinner } from "react-bootstrap"; import { TorrentId } from "../api-types"; import { Torrent } from "./Torrent"; export const TorrentsList = (props: { torrents: Array | null; loading: boolean; }) => { if (props.torrents === null && props.loading) { return ; } // The app either just started, or there was an error loading torrents. if (props.torrents === null) { return; } if (props.torrents.length === 0) { return (

No existing torrents found. Add them through buttons below.

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