-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
WalletLinkHelperModal
migration
- Loading branch information
1 parent
c7fc561
commit ebe5758
Showing
4 changed files
with
46 additions
and
45 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
78 changes: 41 additions & 37 deletions
78
src/v2/components/Web3ConnectionManager/WalletLinkHelperModal.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,49 +1,53 @@ | ||
import { | ||
Box, | ||
ModalBody, | ||
ModalCloseButton, | ||
ModalContent, | ||
ModalHeader, | ||
ModalOverlay, | ||
Text, | ||
} from "@chakra-ui/react" | ||
import { SignOut } from "@phosphor-icons/react" | ||
import LogicDivider from "components/[guild]/LogicDivider" | ||
import Button from "components/common/Button" | ||
import { Modal } from "components/common/Modal" | ||
import { SignOut } from "@phosphor-icons/react/dist/ssr" | ||
import { useAtom } from "jotai" | ||
import { walletLinkHelperModalAtom } from "../Providers/atoms" | ||
import { Button } from "../ui/Button" | ||
import { | ||
Dialog, | ||
DialogCloseButton, | ||
DialogContent, | ||
DialogHeader, | ||
DialogTitle, | ||
} from "../ui/Dialog" | ||
|
||
const WalletLinkHelperModal = () => { | ||
const [isWalletLinkHelperModalOpen, setIsWalletLinkModalOpen] = useAtom( | ||
walletLinkHelperModalAtom | ||
) | ||
|
||
const onClose = () => setIsWalletLinkModalOpen(false) | ||
|
||
return ( | ||
<Modal isOpen={isWalletLinkHelperModalOpen} onClose={onClose}> | ||
<ModalOverlay /> | ||
<ModalContent> | ||
<ModalCloseButton /> | ||
<ModalHeader>Link address</ModalHeader> | ||
<ModalBody> | ||
<Text mt="-3"> | ||
Please switch to the account you want to link and connect with it in your | ||
wallet! | ||
</Text> | ||
<Box borderRadius={"lg"} overflow="hidden" mt="4" minH="448px"> | ||
<video src="/videos/metamask-switch-account.webm" muted autoPlay loop> | ||
Your browser does not support the HTML5 video tag. | ||
</video> | ||
</Box> | ||
<LogicDivider logic="OR" my="1" /> | ||
<Button onClick={onClose} w="full" rightIcon={<SignOut />}> | ||
Connect another wallet | ||
</Button> | ||
</ModalBody> | ||
</ModalContent> | ||
</Modal> | ||
<Dialog | ||
open={isWalletLinkHelperModalOpen} | ||
onOpenChange={setIsWalletLinkModalOpen} | ||
> | ||
<DialogContent> | ||
<DialogHeader> | ||
<DialogTitle>Link address</DialogTitle> | ||
</DialogHeader> | ||
|
||
<p> | ||
Please switch to the account you want to link and connect with it in your | ||
wallet! | ||
</p> | ||
<div className="mt-4 min-h-96 overflow-hidden rounded-lg"> | ||
<video src="/videos/metamask-switch-account.webm" muted autoPlay loop> | ||
Your browser does not support the HTML5 video tag. | ||
</video> | ||
</div> | ||
|
||
<div className="flex w-full items-center gap-4 py-4"> | ||
<hr className="w-full border-border" /> | ||
<span className="text-xs font-bold text-muted-foreground">OR</span> | ||
<hr className="w-full border-border" /> | ||
</div> | ||
|
||
<Button onClick={() => setIsWalletLinkModalOpen(false)} className="w-full"> | ||
Connect another wallet | ||
<SignOut className="ml-1.5" /> | ||
</Button> | ||
<DialogCloseButton /> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
} | ||
export default WalletLinkHelperModal |
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