From 2dbc7f4f246030ae07809b9e0b2e83a47bec6d7c Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:19:41 -0700 Subject: [PATCH] try to put sign up link behind ENV flag --- .env.development | 2 ++ .../src/global/components/sign-in-up/LoginForm/index.js | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index 9e219345c2..7d4255adab 100644 --- a/.env.development +++ b/.env.development @@ -30,3 +30,5 @@ RAILS_DB_HOST=postgres RAILS_DB_PORT=5432 RAILS_DB_NAME=manifold_production RAILS_REDIS_URL=redis://redis:6379 + +REACT_APP_ALLOW_SIGNUP=true diff --git a/client/src/global/components/sign-in-up/LoginForm/index.js b/client/src/global/components/sign-in-up/LoginForm/index.js index 6af4a417f2..045937ba31 100644 --- a/client/src/global/components/sign-in-up/LoginForm/index.js +++ b/client/src/global/components/sign-in-up/LoginForm/index.js @@ -20,6 +20,7 @@ export default function LoginForm({ hideOverlay, willRedirect }) { + const signupEnabled = process.env.REACT_APP_ALLOW_SIGNUP === 'true'; const { t } = useTranslation(); const dispatch = useDispatch(); const authentication = useFromStore("authentication"); @@ -116,9 +117,11 @@ export default function LoginForm({ handleViewChange("password", e)}> {t("forms.signin_overlay.forgot_password")} - handleViewChange("terms", e)}> - {t("forms.signin_overlay.need_account")} - + {signupEnabled && ( + handleViewChange("terms", e)}> + {t("forms.signin_overlay.need_account")} + + )}