Skip to content

Commit 9931ff1

Browse files
committed
Hide vote menu when is multiprocess
1 parent 8097d0d commit 9931ff1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/Process/Aside.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ const ProcessAside = () => {
2525
} = useElection()
2626
const { isConnected } = useAccount()
2727
const { env, clear } = useClient()
28-
2928
if (!election || !(election instanceof PublishedElection)) return null
3029

3130
const census: CensusMeta = dotobject(election?.meta || {}, 'census')
31+
32+
const isMultiProcess = !!election.get('multiprocess')
3233
const renderVoteMenu =
33-
voted ||
34-
(voting && election?.electionType.anonymous) ||
35-
(hasOverwriteEnabled(election) && isInCensus && votesLeft > 0 && voted)
34+
!isMultiProcess &&
35+
(voted ||
36+
(voting && election?.electionType.anonymous) ||
37+
(hasOverwriteEnabled(election) && isInCensus && votesLeft > 0 && voted))
3638

3739
const showVoters =
3840
election?.status !== ElectionStatus.CANCELED &&

0 commit comments

Comments
 (0)