diff --git a/public/exclamation-triangle-fill.svg b/public/exclamation-triangle-fill.svg new file mode 100644 index 00000000..16c5fd63 --- /dev/null +++ b/public/exclamation-triangle-fill.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/public/unsupported-network.svg b/public/unsupported-network.svg deleted file mode 100644 index 0b0449d9..00000000 --- a/public/unsupported-network.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 0d37ebcc..58a5ef95 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -85,17 +85,19 @@ type ModalHeaderProps = children: string; tooltipText?: null; size?: null; + noMargin?: boolean; } | { children: string; tooltipText: string; size: 'large'; + noMargin?: boolean; }; -export const ModalHeader = ({ children, tooltipText, size }: ModalHeaderProps) => { +export const ModalHeader = ({ children, tooltipText, size, noMargin = false }: ModalHeaderProps) => { if (size === 'large') { return ( -
+
{children}
@@ -109,7 +111,7 @@ export const ModalHeader = ({ children, tooltipText, size }: ModalHeaderProps) = } return ( -
+
{children}
); diff --git a/src/components/sign-in/sign-in.module.scss b/src/components/sign-in/sign-in.module.scss index d1732f90..f95f4d1b 100644 --- a/src/components/sign-in/sign-in.module.scss +++ b/src/components/sign-in/sign-in.module.scss @@ -116,6 +116,52 @@ } } +.unsupportedModalContainer { + display: flex; + flex-direction: column; + align-items: center; + gap: 24px; + text-align: center; + width: 100%; + box-sizing: border-box; +} + .unsupportedNetworkIcon { - margin: $space-lg; + margin-top: 80px; + + @media (min-width: $sm) { + margin-top: 0; + width: 40px; + height: 40px; + } +} + +.unsupportedModalContent { + padding-top: 16px; + color: $color-dark-blue-400; + display: flex; + flex-direction: column; + gap: 32px; + + * { + text-wrap: pretty; + } + + p { + @include font-body-9; + } + + span { + @include font-body-7; + } + + @media (min-width: $sm) { + p { + @include font-body-6; + } + + span { + @include font-body-4; + } + } } diff --git a/src/components/sign-in/sign-in.tsx b/src/components/sign-in/sign-in.tsx index 98739dd1..7df22ae5 100644 --- a/src/components/sign-in/sign-in.tsx +++ b/src/components/sign-in/sign-in.tsx @@ -4,10 +4,9 @@ import { Address, useDisconnect, useEnsName } from 'wagmi'; import { useChainData } from '../../chain-data'; import { abbrStr } from '../../chain-data/helpers'; import ConnectButton from '../connect-button'; -import { Modal as GenericModal } from '../../components/modal'; +import { Modal as GenericModal, ModalHeader } from '../../components/modal'; import Dropdown, { DropdownMenu, DropdownMenuItem } from '../../components/dropdown'; import styles from './sign-in.module.scss'; -import globalStyles from '../../styles/global-styles.module.scss'; import { images } from '../../utils'; import { SUPPORTED_NETWORKS, useProviderSubscriptions } from '../../contracts'; import DisconnectIcon from './disconnect-icon'; @@ -97,26 +96,35 @@ const SignIn = ({ dark, position }: Props) => { )} {provider && } {}} hideCloseButton> -
- network not supported -
Unsupported chain!
+
+ network not supported -

- Supported networks:{' '} - {supportedNetworks - .map((network) => {network}) - .map((Component, i) => ( - - {i !== 0 && ', '} - {Component} - - ))} -

-

- Current network: {networkName} -

+ Unsupported chain! -

Please connect your wallet to a supported network.

+
+
+

+ Supported networks:{' '} + {supportedNetworks + .map((network) => {network}) + .map((Component, i) => ( + + {i !== 0 && ', '} + {Component} + + ))} +

+

+ Current network: {networkName} +

+
+ +

Please use your wallet and connect to one of the supported networks.

+
diff --git a/src/utils/image-list.ts b/src/utils/image-list.ts index c5d09986..0df94250 100644 --- a/src/utils/image-list.ts +++ b/src/utils/image-list.ts @@ -16,6 +16,7 @@ export const images = { connectedDark: '/connected-dark.svg', disconnect: '/disconnect.svg', dropdown: '/dropdown.svg', + exclamationTriangleFill: '/exclamation-triangle-fill.svg', error: '/error.svg', externalLink: '/external-link.svg', hamburgerMenu: '/hamburger-menu.svg', @@ -34,7 +35,6 @@ export const images = { votedAgainst: '/voted-against.svg', votedFor: '/voted-for.svg', warning: '/warning.svg', - unsupportedNetwork: '/unsupported-network.svg', }; // We only want to 'preload' certain images that will definitely be displayed immediately.