Skip to content

Commit

Permalink
blonk image
Browse files Browse the repository at this point in the history
  • Loading branch information
ClanCo committed Nov 13, 2024
1 parent d6113bc commit 97bec70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/src/ui/components/HeaderNftBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import useAccountCustom from "@/hooks/useAccountCustom";
import React from "react";
import React, { useMemo } from "react";
import { useNftBalance } from "@/hooks/useNftBalance";
import NftZKUBE from "/assets/nft-zkube.png";

const HeaderNftBalance = React.memo(() => {
const { account } = useAccountCustom();

const { balance } = useNftBalance(account?.address ? account.address : "");
const memoizedImage = useMemo(
() => <img src={NftZKUBE} alt="ZKUBE" className="ml-1 h-8 w-8" />,
[],
);

if (account) {
return (
<span className="text-xs font-semibold md:font-normal flex items-center">
{/*`${balance} Game${balance > 1 ? "s" : ""}`*/}
{`${balance}`}{" "}
<img src={NftZKUBE} alt="ZKUBE" className="ml-1 h-8 w-8" />
{`${balance}`} {memoizedImage}
</span>
);
}
Expand Down

0 comments on commit 97bec70

Please sign in to comment.