Skip to content

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

Fix DeleteProjectButton

Joshen Lim8a49cc8ba797
diff --git a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
index 784ef0600ad..dc25a914d7f 100644
--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
@@ -68,11 +68,13 @@ const DeleteProjectButton = ({ type = 'danger' }: DeleteProjectButtonProps) => {
}
await deleteProject({ projectRef: project.ref })
- await sendExitSurvey({
- projectRef,
- message,
- reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
- })
+ if (!isFree) {
+ await sendExitSurvey({
+ projectRef,
+ message,
+ reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
+ })
+ }
ui.setNotification({ category: 'success', message: `Successfully deleted ${project.name}` })
router.push(`/projects`)