feat(auth-dapp): adds hasInitialized logic

This commit is contained in:
Ben Kremer
2022-09-17 13:08:11 +02:00
parent e8c7bf9c0c
commit 9344954415
2 changed files with 15 additions and 5 deletions
+8 -2
View File
@@ -1,6 +1,9 @@
import { Box, Button, Flex, Heading, Image, position } from "@chakra-ui/react";
const DefaultView: React.FC<{ onClick: () => void }> = ({ onClick }) => {
const DefaultView: React.FC<{
onClick: () => void;
hasInitialized: boolean;
}> = ({ onClick, hasInitialized }) => {
return (
<Box>
<Box position={{ position: "relative" }}>
@@ -37,10 +40,13 @@ const DefaultView: React.FC<{ onClick: () => void }> = ({ onClick }) => {
onClick={onClick}
borderRadius={"16px"}
background="#3396FF"
disabled={!hasInitialized}
>
<Flex gap="1em">
<Image src="/wc.png" fit="scale-down" alt="WC" />
<span style={{ color: "white" }}>WalletConnect</span>
<span style={{ color: "white" }}>
{hasInitialized ? "WalletConnect" : "Initializing..."}
</span>
</Flex>
</Button>
</Flex>