Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about OneGate to the login page #207

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ ul {
right: 15px;
}

.btn_connect_wallet span {
color: #00e599;
position: absolute;
right: 15px;
}

.box {
border-radius: 0;
}
Expand Down
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ export const App = () => {
wcSdk.setSession(session);
}
} catch (error) {
onModal('failed', 'Failed to connect to the wallet, please try again');
onModal('failed', type === 'onegate' ? 'OneGate connection works only if you open the page from OneGate explorer' : 'Failed to connect to the wallet, please try again');
}
}

Expand Down Expand Up @@ -1836,6 +1836,7 @@ export const App = () => {
path="/"
element={<Home
onModal={onModal}
dapi={dapi}
onConnectWallet={onConnectWallet}
/>}
/>
Expand Down
7 changes: 6 additions & 1 deletion src/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
const Home = ({
onModal,
onConnectWallet,
dapi,
}) => {

return (
Expand Down Expand Up @@ -61,7 +62,11 @@ const Home = ({
onClick={() => onConnectWallet('onegate')}
>
Onegate
<img src="/img/icons/wallets/onegate.svg" alt="onegate logo" />
{dapi ? (
<span>Connect</span>
) : (
<img src="/img/icons/wallets/onegate.svg" alt="onegate logo" />
)}
</Button>
<Heading align="center" size={6} weight="normal" style={{ textDecoration: 'underline', cursor: 'pointer' }} onClick={() => onModal('installWallet')}>I don't have a wallet</Heading>
</>
Expand Down
Loading