AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(frontend): Add billing page toggle (#9877)
Zamil Majdy4ddb206f867f
diff --git a/autogpt_platform/frontend/.env.example b/autogpt_platform/frontend/.env.exampleindex f281af189a..3bf277d87b 100644--- a/autogpt_platform/frontend/.env.example+++ b/autogpt_platform/frontend/.env.example@@ -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 tabNEXT_PUBLIC_BEHAVE_AS=LOCAL+NEXT_PUBLIC_SHOW_BILLING_PAGE=falsediff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/layout.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/layout.tsxindex ae2e830f13..06b9cff300 100644--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/layout.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/layout.tsx@@ -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",diff --git a/autogpt_platform/frontend/src/components/agptui/Wallet.tsx b/autogpt_platform/frontend/src/components/agptui/Wallet.tsxindex 9b588d48af..3d0ba27638 100644--- a/autogpt_platform/frontend/src/components/agptui/Wallet.tsx+++ b/autogpt_platform/frontend/src/components/agptui/Wallet.tsx@@ -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