import { useContext } from "react"; import { TorrentId, ErrorDetails as ApiErrorDetails } from "../api-types"; import { AppContext } from "../context"; import { TorrentsList } from "./TorrentsList"; import { ErrorComponent } from "./ErrorComponent"; export const RootContent = (props: { closeableError: ApiErrorDetails | null; otherError: ApiErrorDetails | null; torrents: Array | null; torrentsLoading: boolean; }) => { let ctx = useContext(AppContext); return (
ctx.setCloseableError(null)} />
); };