Skip to content

Commit

Permalink
Add VotingVoteModal
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Oct 17, 2024
1 parent 2310261 commit b6208c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Process/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ProcessAside, { VoteButton } from './Aside'
import { ChainedProcesses, ChainedResults } from './Chained'
import Header from './Header'
import { SuccessVoteModal } from './SuccessVoteModal'
import VotingVoteModal from '~components/Process/VotingVoteModal'

export const ProcessView = () => {
const { t } = useTranslation()
Expand Down Expand Up @@ -146,7 +147,7 @@ export const ProcessView = () => {
>
<VoteButton />
</Box>

<VotingVoteModal />
<SuccessVoteModal />
</Box>
)
Expand Down
26 changes: 26 additions & 0 deletions src/components/Process/VotingVoteModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useTranslation } from 'react-i18next'
import { useElection } from '@vocdoni/react-providers'
import { Modal, ModalBody, ModalContent, ModalOverlay, Spinner, Text, VStack } from '@chakra-ui/react'

const VotingVoteModal = () => {
const { t } = useTranslation()
const {
loading: { voting },
} = useElection()

return (
<Modal isOpen={voting} onClose={() => {}}>
<ModalOverlay />
<ModalContent p='30px !important'>
<ModalBody>
<VStack>
<Spinner color='process.spinner' mb={5} w={10} h={10} />
</VStack>
<Text textAlign='center'>{t('process.voting')}</Text>
</ModalBody>
</ModalContent>
</Modal>
)
}

export default VotingVoteModal

0 comments on commit b6208c5

Please sign in to comment.