DataApiDisabledState.tsx 890 B

1234567891011121314151617181920212223242526272829
  1. import { useParams } from 'common'
  2. import { AlertCircle } from 'lucide-react'
  3. import { Alert, AlertDescription, AlertTitle } from 'ui'
  4. import { InlineLink } from '@/components/ui/InlineLink'
  5. interface DataApiDisabledStateProps {
  6. description: string
  7. }
  8. export const DataApiDisabledState = ({ description }: DataApiDisabledStateProps) => {
  9. const { ref: projectRef } = useParams()
  10. return (
  11. <div className="flex w-full flex-1 items-center justify-center p-10">
  12. <Alert className="max-w-md">
  13. <AlertCircle size={16} />
  14. <AlertTitle>Data API is disabled</AlertTitle>
  15. <AlertDescription>
  16. Enable the Data API in the{' '}
  17. <InlineLink href={`/project/${projectRef}/integrations/data_api/overview`}>
  18. Overview
  19. </InlineLink>{' '}
  20. tab to {description}.
  21. </AlertDescription>
  22. </Alert>
  23. </div>
  24. )
  25. }