Skip to content

Commit

Permalink
fix: staging tou
Browse files Browse the repository at this point in the history
  • Loading branch information
cjkoepke committed Dec 2, 2024
1 parent ad1e481 commit 69db8e0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/components/DoomCanvas/DoomCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const DoomCanvas: React.FC = () => {
{isLoading && !isError
? "Loading..."
: type === EGameType.HOST
? "We're spinning up more servers to meet demand, please try again later."
? "We're spinning up more servers to meet demand, please try again shortly."
: "Oops! You can't join this game right now. It may have already started or hasn't begun yet. Please try again later or check for a new game to join!"}
</div>
)}
Expand Down
77 changes: 43 additions & 34 deletions src/components/LoginModal/LoginModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, {
FC,
SetStateAction,
useEffect,
useMemo,
useState,
} from "react";
import cx from "classnames";
Expand Down Expand Up @@ -90,6 +91,10 @@ const LoginModal: React.FC<LoginModalProps> = ({
readRules: false,
});
const [showSelection, setShowSelection] = useState<boolean>(false);
const requiredTou = useMemo(
() => (API_BASE_URL.includes("staging") ? { privacy: tou.privacy } : tou),
[tou],
);

const { data: providers, isLoading: isLoadingProviders } = useQuery<string[]>(
{
Expand Down Expand Up @@ -141,39 +146,43 @@ const LoginModal: React.FC<LoginModalProps> = ({
return (
<div className="text-left flex flex-col gap-4">
<h1 className="text-5xl uppercase">Tournament Consent</h1>
{/**
* Read the Rules
*/}
<CheckBoxInput
consent="readRules"
label="I confirm that I read, understand and agree to the Hydra Doom Tournament Official Contest Rules."
tou={tou}
setTou={setTou}
/>

{/**
* Are old enough to play
*/}
<CheckBoxInput
consent="oldEnough"
label="I confirm that I am 18 years of age or older."
tou={tou}
setTou={setTou}
/>

{/**
* Not an IOG Employee.
*/}
<CheckBoxInput
consent="nonEmployee"
label="I confirm that I am not an employee of Input Output Global, Inc. or
its subsidiaries, affiliates or other disqualifying entities (as
more fully described in the Hydra Doom Tournament Official Contest
Rules), or an immediate family member or person living in the same
household of the foregoing."
tou={tou}
setTou={setTou}
/>
{API_BASE_URL.includes("staging") ? null : (
<>
{/**
* Read the Rules
*/}
<CheckBoxInput
consent="readRules"
label="I confirm that I read, understand and agree to the Hydra Doom Tournament Official Contest Rules."
tou={tou}
setTou={setTou}
/>

{/**
* Are old enough to play
*/}
<CheckBoxInput
consent="oldEnough"
label="I confirm that I am 18 years of age or older."
tou={tou}
setTou={setTou}
/>

{/**
* Not an IOG Employee.
*/}
<CheckBoxInput
consent="nonEmployee"
label="I confirm that I am not an employee of Input Output Global, Inc. or
its subsidiaries, affiliates or other disqualifying entities (as
more fully described in the Hydra Doom Tournament Official Contest
Rules), or an immediate family member or person living in the same
household of the foregoing."
tou={tou}
setTou={setTou}
/>
</>
)}

{/**
* Privacy consent
Expand All @@ -191,7 +200,7 @@ const LoginModal: React.FC<LoginModalProps> = ({
<Button
className="place-self-center my-8 w-96 h-16 flex items-center gap-4 capitalize"
onClick={() => setShowSelection(true)}
disabled={Object.values(tou).includes(false)}
disabled={Object.values(requiredTou).includes(false)}
>
Continue
</Button>
Expand Down

0 comments on commit 69db8e0

Please sign in to comment.