Skip to content

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

871 B
Raw Blame
import { useParams } from 'common'
import { AlertCircleIcon } from 'lucide-react'
import { Alert, AlertDescription, AlertTitle } from 'ui'

import { InlineLink } from '@/components/ui/InlineLink'

interface DataApiDisabledStateProps {
  description: string
}

export const DataApiDisabledState = ({ description }: DataApiDisabledStateProps) => {
  const { ref: projectRef } = useParams()

  return (
    <div className="flex w-full p-10">
      <Alert className="max-w-md mx-auto">
        <AlertCircleIcon size={16} />
        <AlertTitle>Data API is disabled</AlertTitle>
        <AlertDescription>
          Enable the Data API in the{' '}
          <InlineLink href={`/project/${projectRef}/integrations/data_api/overview`}>
            Overview
          </InlineLink>{' '}
          tab to {description}.
        </AlertDescription>
      </Alert>
    </div>
  )
}