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 { )}