PublicSchemaNotEnabledAlert.tsx 913 B

12345678910111213141516171819202122232425262728
  1. import { useParams } from 'common'
  2. import Link from 'next/link'
  3. import { Button } from 'ui'
  4. import { Admonition } from 'ui-patterns'
  5. const PublicSchemaNotEnabledAlert = () => {
  6. const { ref: projectRef } = useParams()
  7. return (
  8. <Admonition type="default">
  9. <p className="mt-0! mb-1.5!">The public schema for this project is not exposed</p>
  10. <p className="mt-0! mb-1.5! text-foreground-light">
  11. You will not be able to query tables and views in the public schema via briven-js or HTTP
  12. clients. Configure this behavior in your project's Data API settings.
  13. </p>
  14. <Button asChild type="default" className="mt-1">
  15. <Link
  16. href={`/project/${projectRef}/settings/api#postgrest-config`}
  17. className="no-underline!"
  18. >
  19. View API settings
  20. </Link>
  21. </Button>
  22. </Admonition>
  23. )
  24. }
  25. export default PublicSchemaNotEnabledAlert