From 69db8e006611046f6d754701585690b5f77ebc73 Mon Sep 17 00:00:00 2001 From: Calvin Koepke Date: Mon, 2 Dec 2024 13:53:26 -0700 Subject: [PATCH] fix: staging tou --- src/components/DoomCanvas/DoomCanvas.tsx | 2 +- src/components/LoginModal/LoginModal.tsx | 77 +++++++++++++----------- 2 files changed, 44 insertions(+), 35 deletions(-) diff --git a/src/components/DoomCanvas/DoomCanvas.tsx b/src/components/DoomCanvas/DoomCanvas.tsx index 1761931..7208294 100644 --- a/src/components/DoomCanvas/DoomCanvas.tsx +++ b/src/components/DoomCanvas/DoomCanvas.tsx @@ -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!"} )} diff --git a/src/components/LoginModal/LoginModal.tsx b/src/components/LoginModal/LoginModal.tsx index bb93012..bf4cc33 100644 --- a/src/components/LoginModal/LoginModal.tsx +++ b/src/components/LoginModal/LoginModal.tsx @@ -3,6 +3,7 @@ import React, { FC, SetStateAction, useEffect, + useMemo, useState, } from "react"; import cx from "classnames"; @@ -90,6 +91,10 @@ const LoginModal: React.FC = ({ readRules: false, }); const [showSelection, setShowSelection] = useState(false); + const requiredTou = useMemo( + () => (API_BASE_URL.includes("staging") ? { privacy: tou.privacy } : tou), + [tou], + ); const { data: providers, isLoading: isLoadingProviders } = useQuery( { @@ -141,39 +146,43 @@ const LoginModal: React.FC = ({ return (

Tournament Consent

- {/** - * Read the Rules - */} - - - {/** - * Are old enough to play - */} - - - {/** - * Not an IOG Employee. - */} - + {API_BASE_URL.includes("staging") ? null : ( + <> + {/** + * Read the Rules + */} + + + {/** + * Are old enough to play + */} + + + {/** + * Not an IOG Employee. + */} + + + )} {/** * Privacy consent @@ -191,7 +200,7 @@ const LoginModal: React.FC = ({