Skip to content

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

Fix project deletion survey

Joshen Lim698e248db599
diff --git a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
index a4de90d7d37..8a132af57f2 100644
--- a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
+++ b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx
@@ -142,7 +142,7 @@ const ExitSurvey: FC<Props> = ({ freeTier, subscription, onSelectBack }) => {
// Submit exit survey to Hubspot
const feedbackRes = await post(`${API_URL}/feedback/send`, {
projectRef,
- subject: 'Subscription cancellation - Exit survey',
+ subject: 'Subscription cancellation - Exit survey [Downgrade]',
tags: ['dashboard-exitsurvey'],
category: 'Billing',
message: generateFeedbackMessage(selectedReasons, downgradeMessage),
diff --git a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
index f5390b43b32..9ca011ac664 100644
--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
@@ -83,15 +83,17 @@ const DeleteProjectButton: FC<Props> = ({ type = 'danger' }) => {
})
}
- // Submit exit survey to Hubspot
- const feedbackRes = await post(`${API_URL}/feedback/send`, {
- projectRef,
- subject: 'Subscription cancellation - Exit survey',
- tags: ['dashboard-exitsurvey'],
- category: 'Billing',
- message: generateFeedbackMessage(selectedReasons, cancellationMessage),
- })
- if (feedbackRes.error) throw feedbackRes.error
+ // Submit exit survey to Hubspot for paid projects
+ if (!isFree) {
+ const feedbackRes = await post(`${API_URL}/feedback/send`, {
+ projectRef,
+ subject: 'Subscription cancellation - Exit survey [Delete]',
+ tags: ['dashboard-exitsurvey'],
+ category: 'Billing',
+ message: generateFeedbackMessage(selectedReasons, cancellationMessage),
+ })
+ if (feedbackRes.error) throw feedbackRes.error
+ }
}
return (