diff --git a/apps/web/components/header.tsx b/apps/web/components/header.tsx index fd81bf52..c70c62d0 100644 --- a/apps/web/components/header.tsx +++ b/apps/web/components/header.tsx @@ -19,6 +19,7 @@ import { import { Button } from "@ui/components/button" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" +import { getBillingSettingsUrl } from "@/lib/url-helpers" import { GraphIcon, IntegrationsIcon } from "@/components/integration-icons" import { DropdownMenu, @@ -80,6 +81,7 @@ export function Header({ onAddMemory, onOpenSearch }: HeaderProps) { feedbackParam, ) const { viewMode, setViewMode } = useViewMode() + const billingSettingsUrl = getBillingSettingsUrl() const handleFeedback = () => setFeedbackOpen(true) @@ -352,6 +354,15 @@ export function Header({ onAddMemory, onOpenSearch }: HeaderProps) { "linear-gradient(180deg, #0A0E14 0%, #05070A 100%)", }} > + + + + Upgrade + + ) : ( <> + + + + + + Upgrade + + + ) + } + + if (isCurrentPlan) { + return ( + + ) + } + + if (isIncludedPlan) { + return ( + + ) + } + + if (plan.isContactSales) { + return ( + + Contact sales + + ) + } + + const checkoutPlanId = + plan.productId === "api_pro" || plan.productId === "api_scale" + ? plan.productId + : null + if (!checkoutPlanId) return null + + return ( + + ) + } + return (
@@ -671,32 +943,91 @@ export default function Billing() { : "Usage resets with your billing cycle"}

- - {!hasPaidPlan ? ( - - ) : null} +
+ + + + + ) : undefined + } + > + Plans + +
+
+
+ {PLAN_CARDS.map((plan) => ( + + ))} +
+
+ {ADVANCED_PLAN_CARDS.map((plan) => ( + + ))} +
+
+
+ {isPlanCarouselActive ? null : ( +
+ +
+ )} +
+