The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Bring changes from master and resolve conflicts
Joshen Lim3c4d04516e8a
diff --cc studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsxindex dc25a914d7f,670b7be4b8a..6e3433af6a8--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx@@@ -7,31 -8,31 +7,33 @@@ import { Button, Input } from 'uiimport { CANCELLATION_REASONS } from 'components/interfaces/BillingV2/Billing.constants'import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'import TextConfirmModal from 'components/ui/Modals/TextConfirmModal'-import { invalidateProjectsQuery } from 'data/projects/projects-query'-import { useCheckPermissions, useStore } from 'hooks'-import { delete_, post } from 'lib/common/fetch'-import { API_URL, PRICING_TIER_PRODUCT_IDS } from 'lib/constants'+import { useSendDowngradeFeedbackMutation } from 'data/feedback/exit-survey-send'+import { useProjectDeleteMutation } from 'data/projects/project-delete-mutation'+ import { useProjectSubscriptionV2Query } from 'data/subscriptions/project-subscription-v2-query'+import { useCheckPermissions, useStore } from 'hooks'+import { PRICING_TIER_PRODUCT_IDS } from 'lib/constants'export interface DeleteProjectButtonProps {type?: 'danger' | 'default'}const DeleteProjectButton = ({ type = 'danger' }: DeleteProjectButtonProps) => {- const queryClient = useQueryClient()const router = useRouter()const { ui } = useStore()-const { project } = useProjectContext()+const projectRef = project?.ref- const projectTier = project?.subscription_tier ?? PRICING_TIER_PRODUCT_IDS.FREE- const isFree = projectTier === PRICING_TIER_PRODUCT_IDS.FREE+ const { data: subscription } = useProjectSubscriptionV2Query({ projectRef })+ const projectPlan = subscription?.plan?.id ?? 'free'+ const isFree = projectPlan === PRICING_TIER_PRODUCT_IDS.FREEconst [isOpen, setIsOpen] = useState(false)- const [loading, setLoading] = useState(false)+ const [message, setMessage] = useState<string>('')const [selectedReasons, setSelectedReasons] = useState<string[]>([])- const [cancellationMessage, setCancellationMessage] = useState<string>('')++ const { mutateAsync: deleteProject, isLoading: isDeleting } = useProjectDeleteMutation()+ const { mutateAsync: sendExitSurvey, isLoading: isSending } = useSendDowngradeFeedbackMutation()+ const isSubmitting = isDeleting || isSendinguseEffect(() => {if (isOpen) {