import React from "react"; import Proposal from "./ProposalOverlay"; import { ProposalDetail } from "../../types"; import Loading from "../Loading"; const ActiveProposals = (props: { block: number; proposals: ProposalDetail[]; }) => { const { block, proposals } = props; const active = proposals.filter((p) => p && p.stage === "Active"); if (!proposals.length) return ; if (!active.length) return
No active proposals.
; return (
{active.map((p, key: number) => ( ))}
); }; export default ActiveProposals;