A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
TypeScript agent-skillsaidsh-pluginhacktoberfestjavascriptmcp-serverreactresume-builderself-hostedtypescript
feat(flags): introduce flags, disable_user_signups
Amruth Pillaib6267d07ba2d
diff --git a/.env.example b/.env.exampleindex f31381e2a..402cfdeab 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 filediff --git a/client/constants/flags.ts b/client/constants/flags.tsnew file mode 100644index 000000000..f78838b7b--- /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.tsxindex 0b5782092..ef6e5b4cb 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 = () => {<><Button onClick={handleLogin}>{t('landing.actions.login')}</Button>- <Button variant="outlined" onClick={handleRegister}>+ <Button variant="outlined" onClick={handleRegister} disabled={FLAG_DISABLE_SIGNUPS}>{t('landing.actions.register')}</Button></>