From 53c9f5587f30a6a7a798d94d9f1ec7785b5eff1a Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 12 May 2020 15:43:47 +0200 Subject: [PATCH] Council submit candidacy (#2722) * Council submit candidacy * Pass electionsInfo to SubmitCandidacy --- .../src/Overview/SubmitCandidacy.tsx | 16 +++++++++++----- packages/page-council/src/Overview/index.tsx | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/page-council/src/Overview/SubmitCandidacy.tsx b/packages/page-council/src/Overview/SubmitCandidacy.tsx index 00d4e099df..7d6b3a31ea 100644 --- a/packages/page-council/src/Overview/SubmitCandidacy.tsx +++ b/packages/page-council/src/Overview/SubmitCandidacy.tsx @@ -2,17 +2,20 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import { ComponentProps as Props } from './types'; + import React, { useState } from 'react'; import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useModal } from '@polkadot/react-hooks'; import { useTranslation } from '../translate'; -function SubmitCandidacy (): React.ReactElement { +function SubmitCandidacy ({ electionsInfo }: Props): React.ReactElement { const { api } = useApi(); const { t } = useTranslation(); const [accountId, setAcountId] = useState(null); const { isOpen, onClose, onOpen } = useModal(); + const modLocation = api.tx.electionsPhragmen ? 'electionsPhragmen' : 'elections'; return ( <> @@ -40,18 +43,21 @@ function SubmitCandidacy (): React.ReactElement { )}