mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Always showing available networks in tooltip
This commit is contained in:
parent
faf9be8d3a
commit
8aebf9fe3f
@ -1,6 +1,5 @@
|
||||
{
|
||||
"title": "Publish",
|
||||
"description": "Highlight the important features of your data set or algorithm to make it more discoverable and catch the interest of data consumers.",
|
||||
"warning": "Publishing into a test network first is strongly recommended. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms).",
|
||||
"tooltipNetwork": "Assets are published into the network your wallet is connected to. Switch your wallet's network to publish into another one."
|
||||
"warning": "Publishing into a test network first is strongly recommended. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms)."
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import useNetworkMetadata, {
|
||||
filterNetworksByType
|
||||
} from '@hooks/useNetworkMetadata'
|
||||
|
||||
export default function UnsuportedNetwork(): ReactElement {
|
||||
export default function AvailableNetworks(): ReactElement {
|
||||
const { networksList } = useNetworkMetadata()
|
||||
const { appConfig } = useSiteMetadata()
|
||||
|
||||
@ -33,8 +33,8 @@ export default function UnsuportedNetwork(): ReactElement {
|
||||
|
||||
return (
|
||||
<>
|
||||
You are currently on an unsupported network. To proceed with publishing,
|
||||
please switch to one of our supported networks:
|
||||
Assets are published to the network your wallet is conected to. These
|
||||
networks are currently supported:
|
||||
{networkCategories.map(
|
||||
(networkCategory) =>
|
||||
networkCategory.data.length > 0 && (
|
@ -7,7 +7,7 @@ import { wizardSteps } from '../_constants'
|
||||
import SuccessConfetti from '@shared/SuccessConfetti'
|
||||
import { useWeb3 } from '@context/Web3'
|
||||
import Tooltip from '@shared/atoms/Tooltip'
|
||||
import UnsuportedNetwork from '@shared/UnsupportedNetwork'
|
||||
import AvailableNetworks from '@shared/AvailableNetworks'
|
||||
|
||||
export default function Actions({
|
||||
scrollToRef,
|
||||
@ -83,7 +83,7 @@ export default function Actions({
|
||||
</Button>
|
||||
) : !isSupportedOceanNetwork ? (
|
||||
<Tooltip
|
||||
content={<UnsuportedNetwork />}
|
||||
content={<AvailableNetworks />}
|
||||
className={styles.errorTooltip}
|
||||
>
|
||||
<Button type="submit" style="primary" disabled>
|
||||
|
@ -5,7 +5,7 @@ import styles from './index.module.css'
|
||||
import content from '../../../../content/publish/index.json'
|
||||
import { useWeb3 } from '@context/Web3'
|
||||
import Info from '@images/info.svg'
|
||||
import UnsuportedNetwork from '@shared/UnsupportedNetwork'
|
||||
import AvailableNetworks from '@shared/AvailableNetworks'
|
||||
|
||||
export default function Title({
|
||||
networkId
|
||||
@ -27,12 +27,12 @@ export default function Title({
|
||||
/>
|
||||
{isSupportedOceanNetwork ? (
|
||||
<Tooltip
|
||||
content={content.tooltipNetwork}
|
||||
content={<AvailableNetworks />}
|
||||
className={styles.tooltip}
|
||||
/>
|
||||
) : (
|
||||
<Tooltip
|
||||
content={<UnsuportedNetwork />}
|
||||
content={<AvailableNetworks />}
|
||||
className={styles.errorTooltip}
|
||||
>
|
||||
<Info className={styles.errorIcon} />
|
||||
|
Loading…
Reference in New Issue
Block a user