feat(frontend): Add billing page toggle (#9877)

### Changes 🏗️

Provide a system toggle for disabling the billing page:
NEXT_PUBLIC_SHOW_BILLING_PAGE

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Toggle `NEXT_PUBLIC_SHOW_BILLING_PAGE` value.
This commit is contained in:
Zamil Majdy
2025-04-24 21:33:20 +02:00
committed by GitHub
parent 91f34966c8
commit 4ddb206f86
3 changed files with 13 additions and 6 deletions

View File

@@ -24,3 +24,4 @@ GA_MEASUREMENT_ID=G-FH2XK2W4GN
# When running locally, set NEXT_PUBLIC_BEHAVE_AS=CLOUD to use the a locally hosted marketplace (as is typical in development, and the cloud deployment), otherwise set it to LOCAL to have the marketplace open in a new tab
NEXT_PUBLIC_BEHAVE_AS=LOCAL
NEXT_PUBLIC_SHOW_BILLING_PAGE=false

View File

@@ -18,11 +18,15 @@ export default function Layout({ children }: { children: React.ReactNode }) {
href: "/profile/dashboard",
icon: <IconDashboardLayout className="h-6 w-6" />,
},
{
text: "Billing",
href: "/profile/credits",
icon: <IconCoin className="h-6 w-6" />,
},
...(process.env.NEXT_PUBLIC_SHOW_BILLING_PAGE === "true"
? [
{
text: "Billing",
href: "/profile/credits",
icon: <IconCoin className="h-6 w-6" />,
},
]
: []),
{
text: "Integrations",
href: "/profile/integrations",

View File

@@ -104,7 +104,9 @@ export default function Wallet() {
</div>
<ScrollArea className="max-h-[85vh] overflow-y-auto">
{/* Top ups */}
<WalletRefill />
{process.env.NEXT_PUBLIC_SHOW_BILLING_PAGE === "true" && (
<WalletRefill />
)}
{/* Tasks */}
<p className="mx-1 mt-4 font-sans text-xs font-medium text-violet-700">
Onboarding tasks