From 19ed829d2f81b3e1884b72315e9749dd2bd74da5 Mon Sep 17 00:00:00 2001 From: avelous Date: Mon, 26 Feb 2024 19:39:21 +0100 Subject: [PATCH 1/4] load punkwallet on optimism --- packages/nextjs/components/dicedemo/Congrats.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/components/dicedemo/Congrats.tsx b/packages/nextjs/components/dicedemo/Congrats.tsx index c01a970..2975365 100644 --- a/packages/nextjs/components/dicedemo/Congrats.tsx +++ b/packages/nextjs/components/dicedemo/Congrats.tsx @@ -24,7 +24,7 @@ const Congrats = ({ }; const privateKey = loadBurnerSK(); - const pwlink = "https://punkwallet.io/pk#" + privateKey; + const pwlink = "https://punkwallet.io/opt:pk#" + privateKey; return (
From 24468bbe23655e51be4e1b6c37c78737c1930cf5 Mon Sep 17 00:00:00 2001 From: avelous Date: Thu, 29 Feb 2024 08:16:09 +0100 Subject: [PATCH 2/4] fixed hidden menu items and repo link in footer --- packages/nextjs/components/Footer.tsx | 27 ++++--------- packages/nextjs/components/Header.tsx | 55 +++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 26 deletions(-) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index e0f4194..aab4e77 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -11,6 +11,7 @@ import { getTargetNetwork } from "~~/utils/scaffold-eth"; */ export const Footer = () => { const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrencyPrice); + const codeLink = "https://github.com/BuidlGuidl/private-key-dices"; return (
@@ -31,15 +32,13 @@ export const Footer = () => {
diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index a30c33c..9405a90 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -1,27 +1,64 @@ import React, { useCallback, useRef, useState } from "react"; import Image from "next/image"; import Link from "next/link"; -import Wallet from "./Wallet"; +import { useRouter } from "next/router"; import { Bars3Icon } from "@heroicons/react/24/outline"; import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; import { useOutsideClick } from "~~/hooks/scaffold-eth"; +interface HeaderMenuLink { + label: string; + href: string; + icon?: React.ReactNode; +} + +export const menuLinks: HeaderMenuLink[] = [ + { + label: "Home", + href: "/", + }, +]; + +export const HeaderMenuLinks = () => { + const router = useRouter(); + + return ( + <> + {menuLinks.map(({ label, href, icon }) => { + const isActive = router.pathname === href; + return ( +
  • + + {icon} + {label} + +
  • + ); + })} + + ); +}; + /** * Site header */ export const Header = () => { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const burgerMenuRef = useRef(null); + useOutsideClick( burgerMenuRef, useCallback(() => setIsDrawerOpen(false), []), ); return ( -
    +
    @@ -51,11 +90,13 @@ export const Header = () => { Private Key Dice
    +
      + +
    -
    ); From ace75edee9f2754e7b345b246df3811e10595ef5 Mon Sep 17 00:00:00 2001 From: avelous Date: Thu, 29 Feb 2024 08:27:20 +0100 Subject: [PATCH 3/4] corrected github link --- packages/nextjs/components/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index aab4e77..f15f646 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -11,7 +11,7 @@ import { getTargetNetwork } from "~~/utils/scaffold-eth"; */ export const Footer = () => { const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrencyPrice); - const codeLink = "https://github.com/BuidlGuidl/private-key-dices"; + const codeLink = "https://github.com/BuidlGuidl/private-key-dice"; return (
    From 46bd7cb7b4eeb4f3500bebdc995a7dfed8c3d7e2 Mon Sep 17 00:00:00 2001 From: avelous Date: Sat, 2 Mar 2024 09:47:13 +0100 Subject: [PATCH 4/4] added the wallet button --- packages/nextjs/components/Header.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index 9405a90..765db53 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -2,6 +2,7 @@ import React, { useCallback, useRef, useState } from "react"; import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/router"; +import Wallet from "./Wallet"; import { Bars3Icon } from "@heroicons/react/24/outline"; import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; import { useOutsideClick } from "~~/hooks/scaffold-eth"; @@ -97,6 +98,7 @@ export const Header = () => {
    +
    );