diff --git a/.env.example b/.env.example index f31381e2..402cfdea 100644 --- a/.env.example +++ b/.env.example @@ -27,4 +27,7 @@ GOOGLE_API_KEY= SENDGRID_API_KEY= SENDGRID_FORGOT_PASSWORD_TEMPLATE_ID= SENDGRID_FROM_NAME= -SENDGRID_FROM_EMAIL= \ No newline at end of file +SENDGRID_FROM_EMAIL= + +# Flags (Optional) +PUBLIC_FLAG_DISABLE_SIGNUPS=false \ No newline at end of file diff --git a/client/constants/flags.ts b/client/constants/flags.ts new file mode 100644 index 00000000..f78838b7 --- /dev/null +++ b/client/constants/flags.ts @@ -0,0 +1,3 @@ +import env from '@beam-australia/react-env'; + +export const FLAG_DISABLE_SIGNUPS = env('FLAG_DISABLE_SIGNUPS') === 'true'; diff --git a/client/pages/index.tsx b/client/pages/index.tsx index 0b578209..ef6e5b4c 100644 --- a/client/pages/index.tsx +++ b/client/pages/index.tsx @@ -13,6 +13,7 @@ import LanguageSwitcher from '@/components/shared/LanguageSwitcher'; import Logo from '@/components/shared/Logo'; import NoSSR from '@/components/shared/NoSSR'; import { screenshots } from '@/config/screenshots'; +import { FLAG_DISABLE_SIGNUPS } from '@/constants/flags'; import testimonials from '@/data/testimonials'; import { logout } from '@/store/auth/authSlice'; import { setTheme } from '@/store/build/buildSlice'; @@ -74,7 +75,7 @@ const Home: NextPage = () => { <> -