From 115b0eb5054e86a837bfcda38a08bae4a4abb76f Mon Sep 17 00:00:00 2001 From: Lulox Date: Sun, 20 Oct 2024 01:31:55 -0300 Subject: [PATCH] Improvements to PunkConnectButton and ConfigMenu --- .../punk-society/ConfigMenu/AddressInfoDropdown.tsx | 2 +- .../punk-society/PunkConnectButton/AddressInfoDropdown.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/nextjs/components/punk-society/ConfigMenu/AddressInfoDropdown.tsx b/packages/nextjs/components/punk-society/ConfigMenu/AddressInfoDropdown.tsx index 66f12eb..0d21533 100644 --- a/packages/nextjs/components/punk-society/ConfigMenu/AddressInfoDropdown.tsx +++ b/packages/nextjs/components/punk-society/ConfigMenu/AddressInfoDropdown.tsx @@ -40,7 +40,7 @@ export const AddressInfoDropdown = ({ blockExplorerAddressLink }: AddressInfoDro
diff --git a/packages/nextjs/components/punk-society/PunkConnectButton/AddressInfoDropdown.tsx b/packages/nextjs/components/punk-society/PunkConnectButton/AddressInfoDropdown.tsx index 6ee259a..47a8748 100644 --- a/packages/nextjs/components/punk-society/PunkConnectButton/AddressInfoDropdown.tsx +++ b/packages/nextjs/components/punk-society/PunkConnectButton/AddressInfoDropdown.tsx @@ -9,7 +9,6 @@ import { useAccount } from "wagmi"; import { UserIcon } from "@heroicons/react/24/outline"; import { QrCodeIcon } from "@heroicons/react/24/outline"; import { ArrowUpLeftIcon, LinkIcon } from "@heroicons/react/24/solid"; -import { isENS } from "~~/components/scaffold-eth"; import { useOutsideClick, useScaffoldReadContract } from "~~/hooks/scaffold-eth"; type AddressInfoDropdownProps = { @@ -19,7 +18,7 @@ type AddressInfoDropdownProps = { ensAvatar?: string; }; -export const AddressInfoDropdown = ({ address, displayName }: AddressInfoDropdownProps) => { +export const AddressInfoDropdown = ({ address }: AddressInfoDropdownProps) => { const [selectingNetwork, setSelectingNetwork] = useState(false); const checkSumAddress = getAddress(address); @@ -70,7 +69,9 @@ export const AddressInfoDropdown = ({ address, displayName }: AddressInfoDropdow > - {isENS(displayName) ? displayName : checkSumAddress?.slice(0, 6) + "..." + checkSumAddress?.slice(-4)} + {profileInfo && profileInfo[0] != "" + ? profileInfo[0] + : checkSumAddress?.slice(0, 6) + "..." + checkSumAddress?.slice(-4)} {/* */}