diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index 1ffea38..a40bd6f 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -5,6 +5,7 @@ import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { UserBadges } from "./UserBadges"; +import { useAccount } from "wagmi"; import { Bars3Icon, BugAntIcon } from "@heroicons/react/24/outline"; import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; import { useOutsideClick } from "~~/hooks/scaffold-eth"; @@ -59,6 +60,8 @@ export const HeaderMenuLinks = () => { export const Header = () => { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const burgerMenuRef = useRef(null); + const { isConnected } = useAccount(); + useOutsideClick( burgerMenuRef, useCallback(() => setIsDrawerOpen(false), []), @@ -103,7 +106,7 @@ export const Header = () => {
- + {isConnected && }
diff --git a/packages/nextjs/components/UserBadges.tsx b/packages/nextjs/components/UserBadges.tsx index a76cf32..7f41284 100644 --- a/packages/nextjs/components/UserBadges.tsx +++ b/packages/nextjs/components/UserBadges.tsx @@ -1,5 +1,5 @@ import { useAccount } from "wagmi"; -import { IdentificationIcon, PuzzlePieceIcon } from "@heroicons/react/24/outline"; +import { BookmarkSquareIcon, IdentificationIcon, SignalSlashIcon } from "@heroicons/react/24/outline"; import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; export const UserBadges = () => { @@ -21,14 +21,17 @@ export const UserBadges = () => { return (
- {isBuilderOfBatch11 && ( -
+ {madeCheckin ? ( +
+ +
+ ) : isBuilderOfBatch11 ? ( +
- )} - {madeCheckin && ( -
- + ) : ( +
+
)}