diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 1a6703d..5501974 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -101,9 +101,8 @@ export default function Header() { {/* Mobile-only view (Logo & Login) */}
{/* Hamburger Button */} - + + - {/* How it Works */}

setIsModalOpen(true)} @@ -54,43 +89,109 @@ export default function HeroSection() { - {/* Modal */} - {isModalOpen && ( -

+ {/* Authentication Prompt */} + {authMessage && ( +
+
e.stopPropagation()} + > +

{authMessage}

+ +
+
+ )} + + {/* Game Modal */} + {isGameModalOpen && ( +
e.stopPropagation()} + > +

Create Game

+ + {/* Game Selection */} +
+ {games.map((game) => ( +
handleGameSelect(game)} + > + {game.name} +

{game.name}

+
+ ))} +
+ + {/* Price Selection */} +
+ {prices.map((price) => ( +

handlePriceSelect(price)} + > + SOL + {price} SOL +

+ ))} +
+ + +
+
+ )} + + {/* How it Works Modal */} + {isModalOpen && ( +
+
e.stopPropagation()} >

How It Works

- {/* Steps */}
-
-

1. Connect Your Wallet

-

- Start by linking your wallet securely. -

-
-
-

2. Create or Join Game

-

- Pick a game and set a wager, or join an existing match. -

-
-
-

3. Place Your Bet

-

- Confirm your wager and get ready to play. -

-
-
-

4. Claim Your Winnings

-

- Win the game and collect your rewards instantly! -

-
+ {[ + { step: "Connect Your Wallet", desc: "Start by linking your wallet securely." }, + { step: "Create or Join Game", desc: "Pick a game and set a wager, or join an existing match." }, + { step: "Place Your Bet", desc: "Confirm your wager and get ready to play." }, + { step: "Claim Your Winnings", desc: "Win the game and collect your rewards instantly!" }, + ].map(({ step, desc }, index) => ( +
+

{index + 1}. {step}

+

{desc}

+
+ ))}
- {/* Okay Button */}
)} - - {/* Animation */} - ); } diff --git a/src/components/OpenGames.tsx b/src/components/OpenGames.tsx index 6565183..b40d127 100644 --- a/src/components/OpenGames.tsx +++ b/src/components/OpenGames.tsx @@ -1,28 +1,6 @@ "use client"; - import Image from "next/image"; - -const games = [ - { - id: 1, - name: "Block Drop", - entryFee: "0.1 SOL", - thumbnail: "/duelfiassets/Block Drop Illustration.jpeg", - }, - { - id: 2, - name: "Venom Trails", - entryFee: "0.02 ETH", - thumbnail: "/duelfiassets/Venom Trail Game Cover Illustration.png", - }, - { - id: 3, - name: "Wall Smash", - entryFee: "0.05 ETH", - thumbnail: "/duelfiassets/Wall Smash Game Cover Illustration.png", - }, -]; - +import {games} from "../data/games"; export default function OpenGames() { return (
diff --git a/src/components/PrivyButton.tsx b/src/components/PrivyButton.tsx index c4de47c..2d690bc 100644 --- a/src/components/PrivyButton.tsx +++ b/src/components/PrivyButton.tsx @@ -11,8 +11,7 @@ export default function PrivyButton() { const { wallets } = useSolanaWallets(); const [isModalOpen, setIsModalOpen] = useState(false); const [solWallet, setSolWallet] = useState(""); - const [solBalance, setSolBalance] = useState("--"); // Placeholder - const [tokenBalance] = useState("--"); // Placeholder + const [solBalance, setSolBalance] = useState("--"); const modalRef = useRef(null); useEffect(() => { @@ -89,7 +88,7 @@ export default function PrivyButton() { ) : ( @@ -124,12 +123,6 @@ export default function PrivyButton() {

{solBalance} SOL

- {/* Token Balance */} -
-

Token Balance

-

{tokenBalance}

-
- {/* Socials */} {(user?.discord?.username || user?.email?.address) && (
diff --git a/src/data/games.ts b/src/data/games.ts new file mode 100644 index 0000000..2fb874e --- /dev/null +++ b/src/data/games.ts @@ -0,0 +1,27 @@ +export const games = [ + { + id: 1, + name: "Block Drop", + entryFee: "0.1 SOL", + thumbnail: "/duelfiassets/Block Drop Illustration.jpeg", + }, + { + id: 2, + name: "Venom Trails", + entryFee: "0.02 ETH", + thumbnail: "/duelfiassets/Venom Trail Game Cover Illustration.png", + }, + { + id: 3, + name: "Wall Smash", + entryFee: "0.05 ETH", + thumbnail: "/duelfiassets/Wall Smash Game Cover Illustration.png", + }, +]; + +export interface Game { + id: number; + name: string; + entryFee: string; + thumbnail: string; + } \ No newline at end of file