diff --git a/landing/siwe.css b/landing/siwe.css --- a/landing/siwe.css +++ b/landing/siwe.css @@ -1,17 +1,6 @@ -.wrapper { - display: flex; - flex-wrap: wrap; - flex-direction: column; - justify-content: center; - align-items: center; - align-content: center; - padding-top: 20px; - padding-bottom: 50px; -} - -.spacer { - height: 10px; - width: 10px; +html, +body { + background: #242529 !important; } .button { @@ -35,7 +24,9 @@ } } -.h1 { - text-align: center; - margin-bottom: 20px; +body > div > :global(div.iekbcc0) > div { + bottom: initial !important; +} +body > div > :global(div.iekbcc0) > div > div > div > div { + border: 0 !important; } diff --git a/landing/siwe.react.js b/landing/siwe.react.js --- a/landing/siwe.react.js +++ b/landing/siwe.react.js @@ -1,11 +1,13 @@ // @flow import { - ConnectButton, + useConnectModal, getDefaultWallets, RainbowKitProvider, + darkTheme, } from '@rainbow-me/rainbowkit'; import invariant from 'invariant'; +import _merge from 'lodash/fp/merge'; import * as React from 'react'; import { SiweMessage } from 'siwe'; import '@rainbow-me/rainbowkit/dist/index.css'; @@ -77,33 +79,44 @@ signInWithEthereum(address, signer, siweNonce); }, [address, signer, siweNonce]); - if (siweNonce === null || siweNonce === undefined) { + const { openConnectModal } = useConnectModal(); + const hasNonce = siweNonce !== null && siweNonce !== undefined; + React.useEffect(() => { + if (hasNonce) { + openConnectModal(); + } + }, [hasNonce, openConnectModal]); + + if (!hasNonce) { return (