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