Files
supabase/apps/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectPanel.tsx
Gildas Garcia 0713a1efc1 chore: remove shadcn suffix for Input, Textarea, Alert and Collapsible (#45867)
## Problem

Now that we migrated old components to their new shadcn alternatives, we
don't need the `_Shadcn_` suffix anymore.

## Solution

Remove it

<img width="659" height="609" alt="image"
src="https://github.com/user-attachments/assets/2d7271a9-066a-4dcc-92fe-729b106d2c2f"
/>
2026-05-15 14:55:37 +02:00

54 lines
1.9 KiB
TypeScript

import { Alert, AlertDescription, AlertTitle, CriticalIcon } from 'ui'
import {
PageSection,
PageSectionContent,
PageSectionDescription,
PageSectionMeta,
PageSectionSummary,
PageSectionTitle,
} from 'ui-patterns/PageSection'
import { DeleteProjectButton } from './DeleteProjectButton'
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
export const DeleteProjectPanel = () => {
const { data: project } = useSelectedProjectQuery()
const { data: selectedOrganization } = useSelectedOrganizationQuery()
if (project === undefined) return null
const title =
selectedOrganization?.managed_by === 'vercel-marketplace'
? 'Deleting this project will also remove your database and uninstall the resource on Vercel.'
: 'Deleting this project will also remove your database.'
const description =
selectedOrganization?.managed_by === 'vercel-marketplace'
? 'Make sure you have made a backup if you want to keep your data, and that no Vercel project is connected to this resource.'
: 'Make sure you have made a backup if you want to keep your data.'
return (
<PageSection id="delete-project">
<PageSectionMeta>
<PageSectionSummary>
<PageSectionTitle>Delete project</PageSectionTitle>
<PageSectionDescription>
Permanently remove your project and its database
</PageSectionDescription>
</PageSectionSummary>
</PageSectionMeta>
<PageSectionContent>
<Alert variant="destructive">
<CriticalIcon />
<AlertTitle>{title}</AlertTitle>
<AlertDescription>{description}</AlertDescription>
<div className="mt-2">
<DeleteProjectButton />
</div>
</Alert>
</PageSectionContent>
</PageSection>
)
}