import { FC } from 'react' import { Button } from '@supabase/ui' import { PostgresTable } from '@supabase/postgres-meta' import { checkPermissions, useStore } from 'hooks' import { PermissionAction } from '@supabase/shared-types/out/constants' interface Props { selectedSchema: string onAddTable: () => void } const EmptyState: FC = ({ selectedSchema, onAddTable }) => { const { meta } = useStore() const tables = meta.tables.list((table: PostgresTable) => table.schema === selectedSchema) const renderNoTablesCTA = () => { return (

There are no tables available in this schema

{selectedSchema === 'public' && }
) } return (
{tables.length === 0 ? ( renderNoTablesCTA() ) : (

Select a table or create a new one

)}
) } export default EmptyState