Skip to content

Commit 4ddb206

Browse files
authored
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.
1 parent 91f3496 commit 4ddb206

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

β€Žautogpt_platform/frontend/.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ GA_MEASUREMENT_ID=G-FH2XK2W4GN
2424

2525
# 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
2626
NEXT_PUBLIC_BEHAVE_AS=LOCAL
27+
NEXT_PUBLIC_SHOW_BILLING_PAGE=false

β€Žautogpt_platform/frontend/src/app/(platform)/profile/(user)/layout.tsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ export default function Layout({ children }: { children: React.ReactNode }) {
1818
href: "/profile/dashboard",
1919
icon: <IconDashboardLayout className="h-6 w-6" />,
2020
},
21-
{
22-
text: "Billing",
23-
href: "/profile/credits",
24-
icon: <IconCoin className="h-6 w-6" />,
25-
},
21+
...(process.env.NEXT_PUBLIC_SHOW_BILLING_PAGE === "true"
22+
? [
23+
{
24+
text: "Billing",
25+
href: "/profile/credits",
26+
icon: <IconCoin className="h-6 w-6" />,
27+
},
28+
]
29+
: []),
2630
{
2731
text: "Integrations",
2832
href: "/profile/integrations",

β€Žautogpt_platform/frontend/src/components/agptui/Wallet.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ export default function Wallet() {
104104
</div>
105105
<ScrollArea className="max-h-[85vh] overflow-y-auto">
106106
{/* Top ups */}
107-
<WalletRefill />
107+
{process.env.NEXT_PUBLIC_SHOW_BILLING_PAGE === "true" && (
108+
<WalletRefill />
109+
)}
108110
{/* Tasks */}
109111
<p className="mx-1 mt-4 font-sans text-xs font-medium text-violet-700">
110112
Onboarding tasks

0 commit comments

Comments
Β (0)