-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from bancorprotocol/feature/incorrect_network
Wrong network indication
- Loading branch information
Showing
4 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
import { DisabledWarning } from 'components/disabledWarning/DisabledWarning'; | ||
|
||
const title = 'Unsupported network'; | ||
const description = | ||
'In order to proceed, please change your wallets network settings to Ethereum Mainnet.'; | ||
import { Navigate } from 'components/navigate/Navigate'; | ||
import { Button, ButtonSize, ButtonVariant } from 'components/button/Button'; | ||
import { ReactComponent as WarningIcon } from 'assets/icons/warning.svg'; | ||
import { ReactComponent as IconSearch } from 'assets/icons/search.svg'; | ||
import { requestSwitchChain } from 'utils/helperFunctions'; | ||
import { isMobile } from 'react-device-detect'; | ||
|
||
export const UnsupportedNetwork = () => { | ||
return <DisabledWarning title={title} description={description} />; | ||
return ( | ||
<div className="flex flex-col items-center justify-center gap-15 p-15 h-screen text-center"> | ||
<WarningIcon className="w-40 h-40 text-error" /> | ||
<div className="text-[22px]">Wrong network</div> | ||
<div className="text-secondary mb-36"> | ||
Please connect to a supported network in the dropdown menu or in your | ||
wallet | ||
</div> | ||
<div className="flex items-center gap-15"> | ||
<Button | ||
variant={ButtonVariant.Secondary} | ||
size={isMobile ? ButtonSize.Small : ButtonSize.Meduim} | ||
> | ||
<Navigate | ||
to="https://support.bancor.network/hc/en-us/articles/5463892405010-MetaMask-Setup-Guide" | ||
className="flex items-center justify-center gap-12" | ||
> | ||
<IconSearch className="w-20 h-20" /> | ||
Learn How | ||
</Navigate> | ||
</Button> | ||
<Button | ||
variant={ButtonVariant.Primary} | ||
size={isMobile ? ButtonSize.Small : ButtonSize.Meduim} | ||
onClick={() => requestSwitchChain()} | ||
> | ||
Switch Network | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters