Skip to content

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

1009 B
Raw Blame
import { TextConfirmModal } from '@/components/ui/TextConfirmModalWrapper'

interface DeleteDestinationProps {
  visible: boolean
  isLoading: boolean
  name: string
  setVisible: (value: boolean) => void
  onDelete: () => void
}

export const DeleteDestination = ({
  visible,
  isLoading,
  name,
  setVisible,
  onDelete,
}: DeleteDestinationProps) => {
  return (
    <TextConfirmModal
      variant="destructive"
      visible={visible}
      loading={isLoading}
      title="Delete this pipeline"
      confirmLabel={isLoading ? 'Deleting…' : 'Delete pipeline'}
      confirmPlaceholder="Type the pipeline name"
      confirmString={name ?? 'Unknown'}
      text={`This will delete the pipeline "${name}" and stop replication. Already replicated data stays at the destination, and pipeline-hour billing ends when deletion completes.`}
      alert={{ description: 'You cannot recover this pipeline after deletion.' }}
      onCancel={() => setVisible(!visible)}
      onConfirm={onDelete}
    />
  )
}