From a5d96a73f5624559ad0d4c0a92b69d70c80b1229 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 15 Sep 2023 10:17:10 -0700 Subject: [PATCH] chore: conditional wip (#139) --- web/src/pages/index.tsx | 103 +++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 9214f4698..1ff62459c 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -27,7 +27,7 @@ import { usePlayerStore } from "@/hooks/state"; import { Cartridge } from "@/components/icons/branding/Cartridge"; import { Dojo } from "@/components/icons/branding/Dojo"; import { ScrollDown } from "@/components/icons/ScrollDown"; -import { useState } from "react"; +import { useEffect, useState } from "react"; // hardcode game params for now const START_TIME = 0; @@ -49,59 +49,76 @@ export default function Home() { const { resetAll } = usePlayerStore(); const { toast } = useToast(); const [isSubmitting, setIsSubmitting] = useState(false); + const [isGated, setIsGated] = useState(false); + useEffect( + () => + setIsGated(window.location.host === "rollyourown.preview.cartridge.gg"), + [], + ); + return ( - - - - Under Construction - - - Get ready hustlers... Season II starts in September - - + {isGated ? ( + + + + Under Construction + + + Get ready hustlers... Season II starts in September + + + ) : ( + */} + router.push(`/${gameId}/${getLocationById(locationId).slug}`); + }} + > + Hustle + + )} - {/* HALL OF FAME - - - */} + {!isGated && ( + <> + HALL OF FAME + + + + + )} );