Display council candidacy bond (#3023)

This commit is contained in:
Jaco Greeff 2020-06-22 09:23:07 +02:00 committed by GitHub
parent f5e652d530
commit fe99a4c883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
import { ComponentProps as Props } from './types';
import React, { useState } from 'react';
import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components';
import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components';
import { useApi, useModal } from '@polkadot/react-hooks';
import { useTranslation } from '../translate';
@ -39,6 +39,19 @@ function SubmitCandidacy ({ electionsInfo }: Props): React.ReactElement<Props> {
<p>{t<string>('This account will appear in the list of candidates. With enough votes in an election, it will become either a runner-up or a council member.')}</p>
</Modal.Column>
</Modal.Columns>
<Modal.Columns>
<Modal.Column>
<InputBalance
defaultValue={api.consts[modLocation].candidacyBond}
help={t<string>('The bond that is reserved')}
isDisabled
label={t<string>('candidacy bond')}
/>
</Modal.Column>
<Modal.Column>
<p>{t('The bond will be reserved for the duration of your candidacy and membership.')}</p>
</Modal.Column>
</Modal.Columns>
</Modal.Content>
<Modal.Actions onCancel={onClose}>
<TxButton