import { useAccount, useEnsName } from 'wagmi'

export function Account() {
  const { address } = useAccount()
  const { data: ensName } = useEnsName({ address })

  return (
    <div>
      {ensName ?? address?.slice(0, -35)}
      {ensName ? ` (${address})` : null}
    </div>
  )
}
