From 7e9f98f648ecd3995a23dad2626d34b058a7ac16 Mon Sep 17 00:00:00 2001 From: Sewmina Date: Fri, 11 Apr 2025 01:28:20 +0530 Subject: [PATCH] little tweaks --- src/components/GameModal.tsx | 8 +- src/components/Header.tsx | 87 +--------------- src/components/HowItWorksModal.tsx | 8 +- src/components/OpenGames.tsx | 6 +- src/components/PriceSelection.tsx | 2 +- src/components/SupportModal.tsx | 159 +++++++++++++++++++++++++++++ src/components/YourGames.tsx | 14 +-- src/data/games.ts | 2 +- src/shared/solana_helpers.ts | 4 +- 9 files changed, 185 insertions(+), 105 deletions(-) create mode 100644 src/components/SupportModal.tsx diff --git a/src/components/GameModal.tsx b/src/components/GameModal.tsx index 61fb4d6..971171c 100644 --- a/src/components/GameModal.tsx +++ b/src/components/GameModal.tsx @@ -62,7 +62,7 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) { } setIsProcessing(true); - toast.loading("Creating bet"); + toast.loading("Creating Game"); try { const tx = await createBet(wallet, user?.id ?? "", selectedPrice, selectedGame.id, false); const url = EXPLORER_TX_TEMPLATE.replace("{address}", tx); @@ -70,7 +70,7 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) { connection.confirmTransaction(tx, CONFIRMATION_THRESHOLD).finally(()=>{ toast.dismiss(); - toast.success(`Bet created successfully!`, { + toast.success(`Game created successfully!`, { action: { label: "View TX", onClick: () => window.open(url, "_blank"), @@ -83,7 +83,7 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) { onClose(); } catch (error) { console.error("Error creating bet:", error); - toast.error("Failed to create bet. Please try again."); + toast.error("Failed to create Game. Please try again."); toast.dismiss(); } finally { @@ -143,7 +143,7 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) { className="mt-6 w-full py-2 rounded-xl font-semibold bg-[rgb(248,144,22)] text-black hover:bg-white hover:scale-105" onClick={handleCreateGame} > - Confirm & Create Bet + Confirm & Create Game )} diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 3b68289..3ac011f 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -6,18 +6,12 @@ import { FaTelegram, FaXTwitter } from "react-icons/fa6"; import { useState } from "react"; import PrivyButton from "./PrivyButton"; import { URL_TELEGRAM, URL_TWITTER, URL_WHITEPAPER } from "@/shared/constants"; +import SupportModal from "./SupportModal"; export default function Header() { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const [showSupportModal, setShowSupportModal] = useState(false); - // Close modal when clicking outside - const handleModalClick = (e: React.MouseEvent) => { - if (e.target === e.currentTarget) { - setShowSupportModal(false); - } - }; - // Toggle the nav drawer const toggleDrawer = () => { setIsDrawerOpen(!isDrawerOpen); @@ -28,7 +22,7 @@ export default function Header() {
{/* Logo */} -
+
Logo Support - - {showSupportModal && ( -
-
-
-

Support

- -
- -
-
-

Looking for support?

-

- Join our{" "} - - Telegram group - {" "} - — our mods and community are always happy to help! -

-
- -
-

Interested in a collaboration or partnership?

-

Fill out the form below and we'll get back to you as soon as possible.

- -
- - -