Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix exit surveys all getting classified as downgrades

Joshen Limfb9eda73e256
diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
index b9b5b5d7f46..533fb0bd8ac 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
@@ -98,6 +98,7 @@ const ExitSurveyModal = ({ visible, onClose }: ExitSurveyModalProps) => {
projectRef,
reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
message,
+ exitAction: 'downgrade',
})
} finally {
}
diff --git a/studio/components/interfaces/Organization/BillingSettingsV2/Subscription/ExitSurveyModal.tsx b/studio/components/interfaces/Organization/BillingSettingsV2/Subscription/ExitSurveyModal.tsx
index c6f0eed6aa0..4e57308e7f2 100644
--- a/studio/components/interfaces/Organization/BillingSettingsV2/Subscription/ExitSurveyModal.tsx
+++ b/studio/components/interfaces/Organization/BillingSettingsV2/Subscription/ExitSurveyModal.tsx
@@ -93,6 +93,7 @@ const ExitSurveyModal = ({ visible, subscription, onClose }: ExitSurveyModalProp
orgSlug: slug,
reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
message,
+ exitAction: 'downgrade',
})
} finally {
}
diff --git a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
index b1f7f739336..bcdd82cdf49 100644
--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
@@ -77,6 +77,7 @@ const DeleteProjectButton = ({ type = 'danger' }: DeleteProjectButtonProps) => {
projectRef,
message,
reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
+ exitAction: 'delete',
})
}
diff --git a/studio/data/feedback/exit-survey-send.ts b/studio/data/feedback/exit-survey-send.ts
index 1faecb67fc0..f145695e406 100644
--- a/studio/data/feedback/exit-survey-send.ts
+++ b/studio/data/feedback/exit-survey-send.ts
@@ -10,6 +10,7 @@ export type SendDowngradeFeedbackVariables = {
orgSlug?: string
reasons: string
message: string
+ exitAction: 'downgrade' | 'delete'
}
export async function sendDowngradeFeedback({