Skip to content

Commit

Permalink
chore: add onboard div to html files
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashshah committed Sep 20, 2023
1 parent 69949c7 commit c1d4685
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions public/index-alpha.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
1 change: 1 addition & 0 deletions public/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
1 change: 1 addition & 0 deletions public/index-prod.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
1 change: 1 addition & 0 deletions public/index-staging.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
1 change: 1 addition & 0 deletions public/index-w2w.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal"></div>
<div id="onboard-container"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
21 changes: 15 additions & 6 deletions src/AppLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ useEffect(() => {
handleErrorMessage(authError);
}, [authError]);

useEffect(() => {
try {
setAuthError(undefined);
connect();
}
catch(error){
setAuthError(error);
}
}, []);

// RENDER
return (
Expand Down Expand Up @@ -125,7 +134,7 @@ useEffect(() => {
</ItemVV2>

{/* Login Component */}
<ItemVV2
{/* <ItemVV2
background={theme.default.bg}
maxWidth="440px"
padding={GLOBALS.ADJUSTMENTS.PADDING.DEFAULT}
Expand All @@ -140,9 +149,9 @@ useEffect(() => {
fontWeight="500"
margin={`${GLOBALS.ADJUSTMENTS.MARGIN.VERTICAL} 0`}>
Connect a Wallet
</H2V2>
</H2V2> */}

<ItemVV2 alignSelf="stretch" alignItems="flex-start" margin={`0 0 ${GLOBALS.ADJUSTMENTS.MARGIN.VERTICAL} 0`}>
{/* <ItemVV2 alignSelf="stretch" alignItems="flex-start" margin={`0 0 ${GLOBALS.ADJUSTMENTS.MARGIN.VERTICAL} 0`}>
{Object.keys(web3Connectors).map((name) => {
const disabled = isActive();
const image = theme.scheme == 'light' ? web3Connectors[name].logolight : web3Connectors[name].logodark;
Expand Down Expand Up @@ -181,10 +190,10 @@ useEffect(() => {
</LoginButton>
);
})}
</ItemVV2>
</ItemVV2> */}

{/* TOS and PRIVACY */}
<SpanV2 fontSize="14px" padding="0px 20px 10px 20px" color={theme.default.color} lineHeight="140%">
{/* <SpanV2 fontSize="14px" padding="0px 20px 10px 20px" color={theme.default.color} lineHeight="140%">
By connecting your wallet, <b>You agree</b> to our{' '}
<AInlineV2 href="https://epns.io/tos" target="_blank">
Terms of Service
Expand All @@ -195,7 +204,7 @@ useEffect(() => {
</AInlineV2>
.
</SpanV2>
</ItemVV2>
</ItemVV2> */}

{/* Chainsafe Audit and Discord */}
<ItemVV2 margin="30px 0 0 0" flex="initial" maxWidth="920px">
Expand Down
4 changes: 4 additions & 0 deletions src/connectors/web3Onboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const web3Onboard = Onboard({
showSidebar: true,
autoConnectLastWallet: true,
removeWhereIsMyWalletWarning: true,
disableClose: true,
},
containerElements: {
connectModal: "#onboard-container"
},
wallets: [injected, walletConnect],
chains: chains,
Expand Down

0 comments on commit c1d4685

Please sign in to comment.