mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
## Problem We now export components under a subpath in ui-patterns to avoid barrel files as they slow down every tools (from IDE to linters, etc.) and may also affect bundles our users have to download. ## Solution - Remove the UI patterns index file - Fix invalid impors
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { Admonition } from 'ui-patterns/admonition'
|
|
|
|
import { DeleteOrganizationButton } from './DeleteOrganizationButton'
|
|
import PartnerManagedResource from '@/components/ui/PartnerManagedResource'
|
|
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
|
|
import { MANAGED_BY } from '@/lib/constants/infrastructure'
|
|
|
|
export const OrganizationDeletePanel = () => {
|
|
const { data: selectedOrganization } = useSelectedOrganizationQuery()
|
|
|
|
return selectedOrganization?.managed_by !== 'vercel-marketplace' ? (
|
|
<Admonition
|
|
type="destructive"
|
|
title="Deleting this organization will also remove its projects"
|
|
description="Make sure you have made a backup of your projects if you want to keep your data"
|
|
>
|
|
<DeleteOrganizationButton />
|
|
</Admonition>
|
|
) : (
|
|
<PartnerManagedResource
|
|
managedBy={MANAGED_BY.VERCEL_MARKETPLACE}
|
|
resource="Organizations"
|
|
cta={{
|
|
installationId: selectedOrganization?.partner_id,
|
|
path: '/settings',
|
|
message: 'Delete organization in Vercel Marketplace',
|
|
}}
|
|
/>
|
|
)
|
|
}
|