mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
* fix(vercel-marketplace): disable org deletion and project creation * revert dropdown changes * disable deleting a project * disable project creation * fix delete project button * fix captialisation
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import Panel from 'components/ui/Panel'
|
|
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_ } from 'ui'
|
|
import { CriticalIcon } from 'ui'
|
|
import DeleteOrganizationButton from './DeleteOrganizationButton'
|
|
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
|
|
import PartnerManagedResource from 'components/ui/PartnerManagedResource'
|
|
|
|
const OrganizationDeletePanel = () => {
|
|
const selectedOrganization = useSelectedOrganization()
|
|
|
|
return (
|
|
<Panel
|
|
title={
|
|
<p key="panel-title" className="uppercase">
|
|
Danger Zone
|
|
</p>
|
|
}
|
|
>
|
|
<Panel.Content>
|
|
{selectedOrganization?.managed_by !== 'vercel-marketplace' ? (
|
|
<Alert_Shadcn_ variant="destructive">
|
|
<CriticalIcon />
|
|
<AlertTitle_Shadcn_>
|
|
Deleting this organization will also remove its projects
|
|
</AlertTitle_Shadcn_>
|
|
<AlertDescription_Shadcn_>
|
|
Make sure you have made a backup if you want to keep your data
|
|
</AlertDescription_Shadcn_>
|
|
<DeleteOrganizationButton />
|
|
</Alert_Shadcn_>
|
|
) : (
|
|
<PartnerManagedResource
|
|
partner="vercel-marketplace"
|
|
resource="Organizations"
|
|
cta={{
|
|
installationId: selectedOrganization?.partner_id,
|
|
path: '/settings',
|
|
message: 'Delete organization in Vercel Marketplace',
|
|
}}
|
|
/>
|
|
)}
|
|
</Panel.Content>
|
|
</Panel>
|
|
)
|
|
}
|
|
|
|
export default OrganizationDeletePanel
|