Skip to content

Commit

Permalink
Improvements to PunkConnectButton and ConfigMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 20, 2024
1 parent 3f22173 commit 115b0eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const AddressInfoDropdown = ({ blockExplorerAddressLink }: AddressInfoDro
<details ref={dropdownRef} className="dropdown dropdown-end leading-3">
<summary
tabIndex={0}
className="btn btn-secondary shadow-none bg-transparent border-0 btn-sm p-2 dropdown-toggle gap-0 !h-auto"
className="flex items-center justify-center hover:cursor-pointer p-2 shadow-none bg-transparent border-0 btn-sm dropdown-toggle gap-0 !h-auto"
>
<Cog6ToothIcon className="h-5 w-5 ml-2 sm:ml-0" />
</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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);
Expand Down Expand Up @@ -70,7 +69,9 @@ export const AddressInfoDropdown = ({ address, displayName }: AddressInfoDropdow
></div>

<span className="ml-2 mr-1">
{isENS(displayName) ? displayName : checkSumAddress?.slice(0, 6) + "..." + checkSumAddress?.slice(-4)}
{profileInfo && profileInfo[0] != ""
? profileInfo[0]
: checkSumAddress?.slice(0, 6) + "..." + checkSumAddress?.slice(-4)}
</span>
{/* <ChevronDownIcon className="h-6 w-4 ml-2 sm:ml-0" /> */}
</summary>
Expand Down

0 comments on commit 115b0eb

Please sign in to comment.