mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-06 08:16:03 +00:00
fix(billing): capture cancellation after success
This commit is contained in:
parent
006b51c8dd
commit
95f5b6a7b3
1 changed files with 4 additions and 4 deletions
|
|
@ -674,6 +674,10 @@ export default function Billing() {
|
|||
if (!cancellablePlanId) return
|
||||
setIsCancelling(true)
|
||||
try {
|
||||
await autumn.updateSubscription({
|
||||
planId: cancellablePlanId,
|
||||
cancelAction: "cancel_end_of_cycle",
|
||||
})
|
||||
if (posthog?.__loaded) {
|
||||
posthog.capture("subscription_cancelled", {
|
||||
reason: cancelReason,
|
||||
|
|
@ -683,10 +687,6 @@ export default function Billing() {
|
|||
surface: "nova",
|
||||
})
|
||||
}
|
||||
await autumn.updateSubscription({
|
||||
planId: cancellablePlanId,
|
||||
cancelAction: "cancel_end_of_cycle",
|
||||
})
|
||||
autumn.refetch?.()
|
||||
setIsCancelDialogOpen(false)
|
||||
resetCancelForm()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue