From d5bdd42188a4637d38dc0ac28bbc2378d25f3a5f Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 8 Oct 2022 10:14:48 +0300 Subject: [PATCH] Don't show map list makes in prod yet --- app/routes/maps.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/routes/maps.tsx b/app/routes/maps.tsx index 84c25c395..f66e0b9f5 100644 --- a/app/routes/maps.tsx +++ b/app/routes/maps.tsx @@ -13,6 +13,8 @@ import { mapPoolToSerializedString, serializedStringToMapPool, } from "~/modules/map-pool-serializer"; +import { useUser } from "~/modules/auth"; +import { ADMIN_DISCORD_ID } from "~/constants"; export const links: LinksFunction = () => { return [{ rel: "stylesheet", href: styles }]; @@ -87,8 +89,16 @@ function MapPoolSelector({ mapPool: MapPool; handleMapPoolChange: (args: { mode: ModeShort; stageId: StageId }) => void; }) { + const user = useUser(); const { t } = useTranslation(["game-misc"]); + if ( + process.env.NODE_ENV !== "development" && + user?.discordId !== ADMIN_DISCORD_ID + ) { + return
Coming soon :)
; + } + return (
{stageIds.map((stageId) => (