style: remove disclaimer and center button
This commit is contained in:
parent
c038085b87
commit
ad614aff2f
@ -1,13 +1,13 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import {useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
import { useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
||||||
|
|
||||||
import { Button, Box, Container, Typography, colors } from "@mui/material";
|
import { Button, Box, Container } from "@mui/material";
|
||||||
|
|
||||||
import { useWalletConnectContext } from "../context/WalletConnectContext";
|
import { useWalletConnectContext } from "../context/WalletConnectContext";
|
||||||
import { WALLET_DISCLAIMER_MSG } from "../constants";
|
|
||||||
|
|
||||||
const ConnectWallet = () => {
|
const ConnectWallet = () => {
|
||||||
const { connect, session, signClient, checkPersistedState } = useWalletConnectContext();
|
const { connect, session, signClient, checkPersistedState } =
|
||||||
|
useWalletConnectContext();
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
@ -28,13 +28,11 @@ const ConnectWallet = () => {
|
|||||||
|
|
||||||
if (redirectTo) {
|
if (redirectTo) {
|
||||||
navigate(`/${redirectTo}`, {
|
navigate(`/${redirectTo}`, {
|
||||||
state: location.state
|
state: location.state,
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else {
|
|
||||||
navigate("/sign-with-nitro-key", {
|
navigate("/sign-with-nitro-key", {
|
||||||
state: location.state
|
state: location.state,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [session, navigate, redirectTo, location.state]);
|
}, [session, navigate, redirectTo, location.state]);
|
||||||
@ -44,37 +42,16 @@ const ConnectWallet = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container maxWidth="lg">
|
<Container maxWidth="lg" sx={{ height: "75%" }}>
|
||||||
<Box
|
|
||||||
display="flex"
|
|
||||||
flexDirection="column"
|
|
||||||
alignItems="center"
|
|
||||||
justifyContent="center"
|
|
||||||
marginTop={10}
|
|
||||||
sx={{
|
|
||||||
border: 1,
|
|
||||||
borderColor: 'grey.500',
|
|
||||||
}}
|
|
||||||
padding={5}
|
|
||||||
>
|
|
||||||
<Typography variant="h5" component="h1" gutterBottom color={colors.red[400]}>
|
|
||||||
Disclaimer
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body1">
|
|
||||||
{WALLET_DISCLAIMER_MSG}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<Box
|
<Box
|
||||||
display="flex"
|
display="flex"
|
||||||
flexDirection="column"
|
flexDirection="column"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
padding={5}
|
padding={5}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
|
height="100%"
|
||||||
>
|
>
|
||||||
<Button
|
<Button variant="contained" onClick={handler}>
|
||||||
variant="contained"
|
|
||||||
onClick={handler}
|
|
||||||
>
|
|
||||||
Connect Wallet
|
Connect Wallet
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user