import { ApproveModal } from "./Modals/ApproveModal"; import { Button } from "antd"; import { ExecuteModal } from "./Modals/ExecuteModal"; import { GetWhitelistedModal } from "./Modals/GetWhitelistedModal"; import { Link } from "react-router-dom"; import { StakeModal } from "./Modals/StakeModal"; import { VoteModal } from "./Modals/VoteModal"; import { WithdrawForm } from "./Modals/WithdrawModal"; import { useGetAuthorizedActions } from "../Utils/Helpers"; export const ModalCtrl = ({ proposal, daoOwner, proposal_type, currUser, proposalId }) => { const { status_tag, action_type, vote, timeData } = useGetAuthorizedActions({ daoOwner, proposalId, currUser, proposal_type, proposal, }); return (
{action_type == "Approve" && } {["Withdraw", "Execute"].includes(action_type) && vote?.id && ( )} {action_type == "Execute" && ( )} {action_type == "GetWhitelisted" && } {action_type == "GetWhitelisted" && ( )} {action_type == "Voted" && } {action_type == "View" && }
); };