import React, { useContext } from "react" import { useParams } from "react-router-dom" import { Box, Typography } from "@mui/material" import { WalletType } from "@rarible/sdk-wallet" import { Page } from "../../components/page" import { CommentedBlock } from "../../components/common/commented-block" import { FormStepper } from "../../components/common/form-stepper" import { RequestResult } from "../../components/common/request-result" import { InlineCode } from "../../components/common/inline-code" import { CopyToClipboard } from "../../components/common/copy-to-clipboard" import { SellPrepareForm } from "./sell-prepare-form" import { SellForm } from "./sell-form" import { SellComment } from "./comments/sell-comment" import { UnsupportedBlockchainWarning } from "../../components/common/unsupported-blockchain-warning" import { ConnectorContext } from "../../components/connector/sdk-connection-provider" function validateConditions(blockchain: WalletType | undefined): boolean { return !!blockchain } export function SellPage() { const params = useParams() const connection = useContext(ConnectorContext) const blockchain = connection.sdk?.wallet?.walletType return ( { !validateConditions(blockchain) && ( ) } }> { return } }, { label: "Send Transaction", render: (onComplete, lastResponse) => { return } }, { label: "Done", render: (onComplete, lastResponse) => { return <> Order ID:
{data}
} /> } } ]} />
) }