diff --git a/apps/frontend/.eslintrc.json b/apps/frontend/.eslintrc.json index e6b03601..6cfcf667 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.js index 007b2aa5..c79aae74 100644 --- a/apps/frontend/next.config.js +++ b/apps/frontend/next.config.js @@ -12,6 +12,9 @@ const nextConfig = { // See: https://github.com/gregberge/svgr svgr: 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.tsx index f9ee9f2a..105988c5 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 = () => {