Hide send to council for approved (#2307)

This commit is contained in:
Jaco Greeff 2020-02-27 22:38:43 +01:00 committed by GitHub
parent e3b9fffda7
commit 2432e6cd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 10 deletions

View File

@ -18,9 +18,10 @@ interface Props {
isMember: boolean;
proposal: DerivedTreasuryProposal;
onRespond: () => void;
withSend: boolean;
}
export default function ProposalDisplay ({ className, isMember, proposal: { council, id, proposal } }: Props): React.ReactElement<Props> | null {
export default function ProposalDisplay ({ className, isMember, proposal: { council, id, proposal }, withSend }: Props): React.ReactElement<Props> | null {
const { t } = useTranslation();
return (
@ -50,15 +51,19 @@ export default function ProposalDisplay ({ className, isMember, proposal: { coun
/>
</td>
<td className='top number together'>
<Submission
councilProposals={council}
id={id}
isDisabled={!isMember}
/>
<Voting
councilProposals={council}
isDisabled={!isMember}
/>
{withSend && (
<>
<Submission
councilProposals={council}
id={id}
isDisabled={!isMember}
/>
<Voting
councilProposals={council}
isDisabled={!isMember}
/>
</>
)}
</td>
</tr>
);

View File

@ -55,6 +55,7 @@ export default function ProposalsBase ({ className, isApprovals, proposals }: Pr
onRespond={_onRespond}
proposal={proposal}
key={proposal.id.toString()}
withSend={!isApprovals}
/>
))}
</Table.Body>