diff --git a/apps/web/components/settings/billing.tsx b/apps/web/components/settings/billing.tsx index 477a1a1c..149aa46f 100644 --- a/apps/web/components/settings/billing.tsx +++ b/apps/web/components/settings/billing.tsx @@ -14,6 +14,8 @@ import { useQuery, useQueryClient } from "@tanstack/react-query" import { useCustomer } from "autumn-js/react" import { Check, + ChevronLeft, + ChevronRight, Coins, ExternalLink, LoaderIcon, @@ -413,7 +415,8 @@ export default function Billing() { const [isCancelling, setIsCancelling] = useState(false) const [isCancelDialogOpen, setIsCancelDialogOpen] = useState(false) const [isCreditsDialogOpen, setIsCreditsDialogOpen] = useState(false) - const [showOtherPlans, setShowOtherPlans] = useState(false) + const [isPlanCarouselActive, setIsPlanCarouselActive] = useState(false) + const [planPage, setPlanPage] = useState<0 | 1>(0) const [topUpAmount, setTopUpAmount] = useState(25) const [customTopUpAmount, setCustomTopUpAmount] = useState("") const [topUpPendingAmount, setTopUpPendingAmount] = useState( @@ -942,31 +945,70 @@ export default function Billing() {
- Plans -
- {PLAN_CARDS.map((plan) => ( - - ))} -
- {showOtherPlans ? ( -
- {ADVANCED_PLAN_CARDS.map((plan) => ( - - ))} + + + +
+ ) : undefined + } + > + Plans + +
+
+
+ {PLAN_CARDS.map((plan) => ( + + ))} +
+
+ {ADVANCED_PLAN_CARDS.map((plan) => ( + + ))} +
- ) : ( +
+ {isPlanCarouselActive ? null : (