mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
use connect function
This commit is contained in:
parent
c9a043adce
commit
9680468943
@ -28,11 +28,9 @@ const Blockies = ({ account }: { account: string | undefined }) => {
|
|||||||
// Forward ref for Tippy.js
|
// Forward ref for Tippy.js
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
const Account = React.forwardRef((props, ref: any) => {
|
const Account = React.forwardRef((props, ref: any) => {
|
||||||
const { accountId, status, web3Modal } = useOcean()
|
const { accountId, status, connect } = useOcean()
|
||||||
const hasSuccess = status === 1
|
const hasSuccess = status === 1
|
||||||
|
|
||||||
console.log(web3Modal)
|
|
||||||
|
|
||||||
return accountId ? (
|
return accountId ? (
|
||||||
<button className={styles.button} aria-label="Account" ref={ref}>
|
<button className={styles.button} aria-label="Account" ref={ref}>
|
||||||
<Blockies account={accountId} />
|
<Blockies account={accountId} />
|
||||||
@ -47,7 +45,7 @@ const Account = React.forwardRef((props, ref: any) => {
|
|||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className={styles.button}
|
className={styles.button}
|
||||||
onClick={() => web3Modal.toggleModal()}
|
onClick={() => connect()}
|
||||||
// Need the `ref` here although we do not want
|
// Need the `ref` here although we do not want
|
||||||
// the Tippy to show in this state.
|
// the Tippy to show in this state.
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
Loading…
Reference in New Issue
Block a user