@pioneer-platform/pioneer-react 0.2.35 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,67 +0,0 @@
1
- import {
2
- Button,
3
- Modal,
4
- ModalOverlay,
5
- ModalContent,
6
- ModalHeader,
7
- ModalCloseButton,
8
- ModalBody,
9
- ModalFooter,
10
- Tabs,
11
- TabList,
12
- Tab,
13
- TabPanels,
14
- Card,
15
- CardBody,
16
- TabPanel,
17
- } from "@chakra-ui/react";
18
- import { useState, useEffect } from "react";
19
-
20
- import { usePioneer } from "lib/context/Pioneer";
21
-
22
- interface ModalProps {
23
- isOpen: boolean;
24
- onClose: () => void;
25
- }
26
- //@ts-ignore
27
- const OnboardingModal: React.FC<ModalProps> = ({ isOpen, onClose }) => {
28
- const { state, dispatch } = usePioneer();
29
- const { api, app, user, context } = state;
30
- const [walletDescriptions, setWalletDescriptions] = useState([]);
31
- const [balances, setBalances] = useState([]);
32
-
33
- const setUser = async function () {
34
- try {
35
- if (user && user.wallets) {
36
- const { wallets, walletDescriptions, balances, pubkeys } = user;
37
- setWalletDescriptions(walletDescriptions);
38
- setBalances(balances);
39
- }
40
- } catch (e) {
41
- console.error("header e: ", e);
42
- }
43
- };
44
-
45
- useEffect(() => {
46
- setUser();
47
- }, [user]); // once on startup
48
-
49
- return (
50
- <Modal isOpen={isOpen} onClose={onClose} size="xl">
51
- <ModalOverlay />
52
- <ModalContent>
53
- <ModalHeader>Wallet Select</ModalHeader>
54
- <ModalCloseButton />
55
- <ModalBody></ModalBody>
56
- <ModalFooter>
57
- <Button colorScheme="blue" mr={3} onClick={onClose}>
58
- Close
59
- </Button>
60
- <Button variant="ghost">Secondary Action</Button>
61
- </ModalFooter>
62
- </ModalContent>
63
- </Modal>
64
- );
65
- };
66
-
67
- export default OnboardingModal;