-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- now the contents of ConfirmModal are defined by the prompt contents, meaning you have to define the buttons yourself - fix anonymous vote creation passing password instead of signature as argument - moved everything related to sik password and signature from the client to the election provider, since it doesn't make sense to have it at client level, and it was causing issues with multiple wallets connected - upgrade SDK to 0.6.0
- Loading branch information
1 parent
24b6b5c
commit 33152c9
Showing
14 changed files
with
137 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 3 additions & 26 deletions
29
packages/chakra-components/src/components/layout/ConfirmModal/ConfirmModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,15 @@ | ||
import { Button } from '@chakra-ui/button' | ||
import { | ||
Modal, | ||
ModalBody, | ||
ModalCloseButton, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
ModalOverlay, | ||
} from '@chakra-ui/modal' | ||
import { Modal, ModalContent, ModalOverlay } from '@chakra-ui/modal' | ||
import { useMultiStyleConfig } from '@chakra-ui/system' | ||
import { useClient } from '@vocdoni/react-providers' | ||
import { useConfirm } from './ConfirmProvider' | ||
|
||
export const ConfirmModal = () => { | ||
const styles = useMultiStyleConfig('ConfirmModal') | ||
const { prompt, isOpen, proceed, cancel } = useConfirm() | ||
const { localize } = useClient() | ||
const { prompt, isOpen, cancel } = useConfirm() | ||
|
||
return ( | ||
<Modal isOpen={isOpen} onClose={cancel!}> | ||
<ModalOverlay sx={styles.overlay} /> | ||
<ModalContent sx={styles.content}> | ||
<ModalHeader sx={styles.header}>{localize('confirm.title')}</ModalHeader> | ||
<ModalCloseButton sx={styles.close} /> | ||
<ModalBody sx={styles.body}>{prompt}</ModalBody> | ||
<ModalFooter sx={styles.footer}> | ||
<Button onClick={cancel!} variant='ghost' sx={styles.cancel}> | ||
{localize('confirm.cancel')} | ||
</Button> | ||
<Button onClick={proceed!} sx={styles.confirm}> | ||
{localize('confirm.confirm')} | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
<ModalContent sx={styles.content}>{prompt}</ModalContent> | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.