Skip to content

Commit

Permalink
chore: conditional wip
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Sep 15, 2023
1 parent 02e8821 commit 926939b
Showing 1 changed file with 55 additions and 42 deletions.
97 changes: 55 additions & 42 deletions web/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,58 +50,71 @@ export default function Home() {
const { toast } = useToast();
const [isSubmitting, setIsSubmitting] = useState(false);

const showUnderConstruction =
window.location.host === "rollyourown.preview.cartridge.gg";
console.log(window.location.host);
return (
<Layout CustomLeftPanel={HomeLeftPanel}>
<VStack boxSize="full" gap="10px" justify="center">
<Card variant="pixelated">
<HStack w="full" p="20px" gap="10px" justify="center">
<VStack>
<HStack>
<Alert />
<Text align="center">Under Construction</Text>
</HStack>
<Text align="center">
Get ready hustlers... Season II starts in September
</Text>
</VStack>

{/* <Button
flex="1"
isDisabled={!account}
isLoading={isSubmitting && !txError}
onClick={async () => {
setIsSubmitting(true);
resetAll();
const { event, hash } = await createGame(
START_TIME,
MAX_PLAYERS,
NUM_TURNS,
);
{showUnderConstruction ? (
<VStack>
<HStack>
<Alert />
<Text align="center">Under Construction</Text>
</HStack>
<Text align="center">
Get ready hustlers... Season II starts in September
</Text>
</VStack>
) : (
<Button
flex="1"
isDisabled={!account}
isLoading={isSubmitting && !txError}
onClick={async () => {
setIsSubmitting(true);
resetAll();
const { event, hash } = await createGame(
START_TIME,
MAX_PLAYERS,
NUM_TURNS,
);

const { gameId, locationId } = event as JoinedEventData;
toast("Created Game", Alert, `http://amazing_explorer/${hash}`);
const { gameId, locationId } = event as JoinedEventData;
toast(
"Created Game",
Alert,
`http://amazing_explorer/${hash}`,
);

router.push(`/${gameId}/${getLocationById(locationId).slug}`);
}}
>
Hustle
</Button> */}
router.push(`/${gameId}/${getLocationById(locationId).slug}`);
}}
>
Hustle
</Button>
)}
</HStack>
</Card>

{/* <Text>HALL OF FAME</Text>
<VStack
boxSize="full"
gap="20px"
sx={{
overflowY: "scroll",
"&::-webkit-scrollbar": {
display: "none",
},
}}
>
<Leaderboard />
</VStack> */}
{!showUnderConstruction && (
<>
<Text>HALL OF FAME</Text>
<VStack
boxSize="full"
gap="20px"
sx={{
overflowY: "scroll",
"&::-webkit-scrollbar": {
display: "none",
},
}}
>
<Leaderboard />
</VStack>
</>
)}
</VStack>
</Layout>
);
Expand Down

0 comments on commit 926939b

Please sign in to comment.