diff --git a/packages/page-council/src/Motions/Close.tsx b/packages/page-council/src/Motions/Close.tsx new file mode 100644 index 0000000000..7aa17ed4e0 --- /dev/null +++ b/packages/page-council/src/Motions/Close.tsx @@ -0,0 +1,67 @@ +// Copyright 2017-2020 @polkadot/app-council authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; + +import React, { useState } from 'react'; +import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; +import { useAccounts, useToggle } from '@polkadot/react-hooks'; + +import { useTranslation } from '../translate'; + +interface Props { + hash: Hash; + idNumber: ProposalIndex; + proposal: Proposal; +} + +function Close ({ hash, idNumber, proposal }: Props): React.ReactElement | null { + const { t } = useTranslation(); + const { hasAccounts } = useAccounts(); + const [isOpen, toggleOpen] = useToggle(); + const [accountId, setAccountId] = useState(null); + + if (!hasAccounts) { + return null; + } + + return ( + <> + {isOpen && ( + + + + + + + + + + )} +