Skip to content

Commit

Permalink
Merge pull request #207 from nspcc-dev/feature/190-onegate_note
Browse files Browse the repository at this point in the history
Add a note about OneGate to the login page
  • Loading branch information
roman-khimov authored Apr 15, 2024
2 parents 45de9b9 + 7087895 commit 719833d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
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

0 comments on commit 719833d

Please sign in to comment.