π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: remove billing if not stripe
Nevo David580bb6b1621e
diff --git a/apps/frontend/.eslintrc.json b/apps/frontend/.eslintrc.jsonindex e6b036019..6cfcf667c 100644--- a/apps/frontend/.eslintrc.json+++ b/apps/frontend/.eslintrc.json@@ -10,7 +10,8 @@{"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],"rules": {- "@next/next/no-html-link-for-pages": ["error", "apps/frontend/pages"]+ "@next/next/no-html-link-for-pages": ["error", "apps/frontend/pages"],+ "no-extra-boolean-cast": "off"}},{diff --git a/apps/frontend/next.config.js b/apps/frontend/next.config.jsindex 007b2aa51..c79aae74c 100644--- a/apps/frontend/next.config.js+++ b/apps/frontend/next.config.js@@ -12,6 +12,9 @@ const nextConfig = {// See: https://github.com/gregberge/svgrsvgr: false,},+ env: {+ isBillingEnabled: String(!!process.env.STRIPE_PUBLISHABLE_KEY),+ }};const plugins = [diff --git a/apps/frontend/src/components/layout/top.menu.tsx b/apps/frontend/src/components/layout/top.menu.tsxindex f9ee9f2aa..105988c5d 100644--- a/apps/frontend/src/components/layout/top.menu.tsx+++ b/apps/frontend/src/components/layout/top.menu.tsx@@ -28,6 +28,7 @@ export const menuItems = [icon: 'billing',path: '/billing',role: ['ADMIN', 'SUPERADMIN'],+ requireBilling: true,},];@@ -40,6 +41,9 @@ export const TopMenu: FC = () => {<ul className="gap-5 flex flex-1 items-center text-[18px]">{menuItems.filter((f) => {+ if (f.requireBilling && process.env.isBillingEnabled === 'false') {+ return false;+ }if (f.role) {return f.role.includes(user?.role!);}