From 02e8821eff38e8b44be8c87313032b8b8a9a76e1 Mon Sep 17 00:00:00 2001 From: broody Date: Fri, 15 Sep 2023 09:01:02 -0700 Subject: [PATCH 1/3] fix(web): initial target location --- web/src/pages/[gameId]/travel.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/pages/[gameId]/travel.tsx b/web/src/pages/[gameId]/travel.tsx index 57c759802..39f4b3e1a 100644 --- a/web/src/pages/[gameId]/travel.tsx +++ b/web/src/pages/[gameId]/travel.tsx @@ -41,6 +41,7 @@ export default function Travel() { if (playerEntity && !isSubmitting) { const location = getLocationById(playerEntity.locationId); setCurrentLocationId(location.id); + setTargetId(location.id); } }, [playerEntity, isSubmitting]); From a5d96a73f5624559ad0d4c0a92b69d70c80b1229 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 15 Sep 2023 10:17:10 -0700 Subject: [PATCH 2/3] 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 + + + + + )} ); From 4f45fdc6d9a908ade3cb82705582ce00be4362cc Mon Sep 17 00:00:00 2001 From: broody Date: Fri, 15 Sep 2023 11:11:51 -0700 Subject: [PATCH 3/3] fix(web): drug card hover area --- .../pages/[gameId]/[locationSlug]/index.tsx | 32 ++++++++++++------- web/src/pages/index.tsx | 2 +- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/web/src/pages/[gameId]/[locationSlug]/index.tsx b/web/src/pages/[gameId]/[locationSlug]/index.tsx index e72e13a64..510e7eb8b 100644 --- a/web/src/pages/[gameId]/[locationSlug]/index.tsx +++ b/web/src/pages/[gameId]/[locationSlug]/index.tsx @@ -13,6 +13,7 @@ import { StyleProps, useDisclosure, useBreakpointValue, + Flex, } from "@chakra-ui/react"; import Layout from "@/components/Layout"; import { useRouter } from "next/router"; @@ -120,24 +121,31 @@ export default function Location() { {drugInfo.name} - - + - - + + + + {drugInfo.icon({})} diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 1ff62459c..f7a23f5d4 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -56,7 +56,7 @@ export default function Home() { setIsGated(window.location.host === "rollyourown.preview.cartridge.gg"), [], ); - + return (