mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Adding Change Network tooltip to submit page
This commit is contained in:
parent
453b7d9da7
commit
d2c74cdeb7
@ -5,6 +5,9 @@ import { FormikContextType, useFormikContext } from 'formik'
|
||||
import { FormPublishData } from '../_types'
|
||||
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'
|
||||
|
||||
export default function Actions({
|
||||
scrollToRef,
|
||||
@ -13,6 +16,7 @@ export default function Actions({
|
||||
scrollToRef: RefObject<any>
|
||||
did: string
|
||||
}): ReactElement {
|
||||
const { isSupportedOceanNetwork } = useWeb3()
|
||||
const {
|
||||
values,
|
||||
errors,
|
||||
@ -65,6 +69,15 @@ export default function Actions({
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
) : !isSupportedOceanNetwork ? (
|
||||
<Tooltip
|
||||
content={<UnsuportedNetwork />}
|
||||
className={styles.errorTooltip}
|
||||
>
|
||||
<Button type="submit" style="primary" disabled>
|
||||
Change Network
|
||||
</Button>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<Button
|
||||
type="submit"
|
||||
|
@ -25,7 +25,6 @@ import { getOceanConfig } from '@utils/ocean'
|
||||
import { validationSchema } from './_validation'
|
||||
import { useAbortController } from '@hooks/useAbortController'
|
||||
import { setNFTMetadataAndTokenURI } from '@utils/nft'
|
||||
import UnsupportedNetwork from '@shared/UnsupportedNetwork'
|
||||
|
||||
// TODO: restore FormikPersist, add back clear form action
|
||||
const formName = 'ocean-publish-form'
|
||||
|
Loading…
Reference in New Issue
Block a user