Skip to content

Commit

Permalink
Changed location of eth balance in mobile and desktop versions
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Dec 16, 2024
1 parent d6e2a62 commit 2d2ea52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { ConfigMenu } from "./punk-society/ConfigMenu";
import { PunkBalance } from "./punk-society/PunkBalance";
import { PunkConnectButton } from "./punk-society/PunkConnectButton";
import { FaucetButton } from "./scaffold-eth";
import { useAccount } from "wagmi";
Expand Down Expand Up @@ -47,8 +48,11 @@ export const Header = () => {
<Image src="/usdc-logo.png" alt="USDC" width={20} height={20} className="inline-block" />
<span className="ml-2">{formattedUsdcBalance}</span>
</span>
<div className="ml-2">
<PunkBalance address={connectedAddress} />
</div>
</div>
<div className="flex flex-row gap-3 ">
<div className="hidden lg:flex flex-row gap-3 ">
<Link href="/" passHref>
<button
className={`bg-transparent hover:bg-transparent border-none hidden lg:flex flex-row items-center justify-center text-xl ${
Expand Down Expand Up @@ -123,6 +127,9 @@ export const Header = () => {
</div> */}

<div className="flex flex-row items-center justify-center ">
<div className="hidden lg:flex justify-center mr-2">
<PunkBalance address={connectedAddress} />
</div>
<span className="mr-2 hidden lg:flex items-center justify-center gap-1 text-lg text-blue-600 font-bold">
<Image src="/usdc-logo.png" alt="USDC" width={20} height={20} className="inline-block" />
{formattedUsdcBalance}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef, useState } from "react";
import Link from "next/link";
import { PunkBalance } from "../PunkBalance";
// import { PunkBalance } from "../PunkBalance";
import { NetworkOptions } from "./NetworkOptions";
// import { FundButton, getOnrampBuyUrl } from "@coinbase/onchainkit/fund";
import { getAddress } from "viem";
Expand Down Expand Up @@ -81,8 +81,9 @@ export const AddressInfoDropdown = ({ address }: AddressInfoDropdownProps) => {
className="dropdown-content menu z-[2] p-2 mt-2 shadow-center shadow-accent bg-base-200 rounded-box gap-1"
>
<NetworkOptions hidden={!selectingNetwork} />

<PunkBalance address={connectedAddress} />
{/* <div className="flex lg:hidden justify-center">
<PunkBalance address={connectedAddress} />
</div> */}
<li className={selectingNetwork ? "hidden" : ""}>
<Link className="p-0 flex items-center justify-center" href={`/profile/${connectedAddress}`} passHref>
<div className="btn-sm w-full !rounded-xl flex items-center justify-start gap-2 py-3 text-white bg-orange-600 hover:bg-orange-500 active:bg-orange-500">
Expand Down

0 comments on commit 2d2ea52

Please sign in to comment.