diff --git a/src/app/dashboard/slots/[id]/page.tsx b/src/app/dashboard/slots/[id]/page.tsx index 8043e63..ba8e544 100644 --- a/src/app/dashboard/slots/[id]/page.tsx +++ b/src/app/dashboard/slots/[id]/page.tsx @@ -145,7 +145,7 @@ export default function SlotDetailPage({ // MODAL / CHECKOUT STATE const [isModalOpen, setIsModalOpen] = useState(false); - const [purchaseStep, setPurchaseStep] = useState<"confirm" | "loading" | "success">("confirm"); + const [purchaseStep, setPurchaseStep] = useState<"auth" | "confirm" | "loading" | "success">("auth"); const [loadingMessage, setLoadingMessage] = useState(""); const [txHash, setTxHash] = useState(""); const [announcement, setAnnouncement] = useState(""); // Screen reader announcer @@ -197,13 +197,13 @@ export default function SlotDetailPage({ const handleOpenModal = () => { if (!isWalletReady || !hasFunds) return; - setPurchaseStep("confirm"); + setPurchaseStep("auth"); setIsModalOpen(true); }; const handleCloseModal = useCallback(() => { setIsModalOpen(false); - setPurchaseStep("confirm"); + setPurchaseStep("auth"); }, []); // Keyboard navigation & focus management inside checkout modal @@ -717,13 +717,109 @@ export default function SlotDetailPage({ )} + {/* STEP 0: AUTHENTICATION / PATH SELECTION */} + {purchaseStep === "auth" && ( +
+
+ +

+ Choose your checkout path to secure this booking. +

+
+ +
+ {/* Guest Card */} +
+
+

Guest (Wallet Only)

+
+
    +
  • + + Fast checkout +
  • +
  • + + No booking history or preferences saved +
  • +
+ +
+ + {/* Sign In Card */} +
+
+

+ Sign In + + + + Signing in syncs your wallet with your profile, giving you access to purchase history, saved settings, and priority support. + + +

+ + Recommended + +
+
    +
  • + + Full booking history & receipts +
  • +
  • + + Saved preferences & notifications +
  • +
+ +
+ + {/* Create Account Card */} +
+
+

Create Account

+
+
    +
  • + + Unlock all platform features +
  • +
  • + + Setup takes < 1 minute +
  • +
+ +
+
+
+ )} + {/* STEP 1: INITIAL CONFIRMATION DETAILS */} {purchaseStep === "confirm" && (