Add a "clear all" button to council vote (#3382)
* add clear all to council vote * add parrentheses * disabled rather than hidden * Update packages/page-council/src/Overview/Vote.tsx Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> Co-authored-by: Jaco Greeff <jacogr@gmail.com>
This commit is contained in:
parent
ce730e655d
commit
922092b337
@ -109,6 +109,19 @@ function Vote ({ electionsInfo }: Props): React.ReactElement<Props> {
|
||||
</Modal.Columns>
|
||||
</Modal.Content>
|
||||
<Modal.Actions onCancel={toggleVisible}>
|
||||
<TxButton
|
||||
accountId={accountId}
|
||||
icon='trash-alt'
|
||||
isDisabled={!defaultVotes.length}
|
||||
label={t<string>('Unvote all')}
|
||||
onStart={toggleVisible}
|
||||
params={[]}
|
||||
tx={
|
||||
api.tx.electionsPhragmen
|
||||
? 'electionsPhragmen.removeVoter'
|
||||
: 'elections.removeVoter'
|
||||
}
|
||||
/>
|
||||
<TxButton
|
||||
accountId={accountId}
|
||||
isDisabled={!accountId || votes.length === 0 || voteValue.lten(0)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user