diff --git a/src/components/Process/Aside.tsx b/src/components/Process/Aside.tsx index c0a463a..f8541cd 100644 --- a/src/components/Process/Aside.tsx +++ b/src/components/Process/Aside.tsx @@ -6,7 +6,7 @@ import { dotobject, ElectionStatus, formatUnits, PublishedElection } from '@vocd import { TFunction } from 'i18next' import { Trans, useTranslation } from 'react-i18next' import { Link as ReactRouterLink } from 'react-router-dom' -import { useAccount } from 'wagmi' +import { useAccount, useDisconnect } from 'wagmi' import { CensusMeta } from './Census/CensusType' const results = (result: number, decimals?: number) => @@ -14,6 +14,7 @@ const results = (result: number, decimals?: number) => const ProcessAside = () => { const { t } = useTranslation() + const { disconnect } = useDisconnect() const { election, connected, @@ -23,7 +24,7 @@ const ProcessAside = () => { loading: { voting }, } = useElection() const { isConnected } = useAccount() - const { env } = useClient() + const { env, clear } = useClient() if (!election || !(election instanceof PublishedElection)) return null @@ -157,7 +158,7 @@ const ProcessAside = () => { )} - {connected && ( + {(connected || isConnected) && ( { mb={{ base: 10, md: 0 }} > + {isConnected && ( + + )} )}