import { Popover } from "@headlessui/react" ; import React from "react" ; import { useWallet } from "../service/wallet/wallet" ; import { UserCircleIcon } from "@heroicons/react/outline" ; import Button from "./Button" ; const WalletBar = ( ) => { const { connected , wallet } = useWallet ( ) ; return ( < > { } < div > { ! connected && ( < Button icon = { UserCircleIcon } text = "User" onClick = { connected ? wallet . disconnect : wallet . connect } / > ) } { connected && ( < Popover title = "Wallet public key" > < /Popover>)} < /div> { } < />); } ; export default WalletBar ;