import { PermissionAction } from '@supabase/shared-types/out/constants' import { ExternalLink, GitBranch, GitPullRequest } from 'lucide-react' import Link from 'next/link' import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState' import { ButtonTooltip } from 'components/ui/ButtonTooltip' import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useAppStateSnapshot } from 'state/app-state' import { Button } from 'ui' export const BranchingEmptyState = () => { const snap = useAppStateSnapshot() const canEnableBranching = useCheckPermissions(PermissionAction.CREATE, 'preview_branches', { resource: { is_default: true }, }) return (

Create preview branches to experiment changes to your database schema in a safe, non-destructible environment.

} onClick={() => snap.setShowEnableBranchingModal(true)} tooltip={{ content: { side: 'bottom', text: !canEnableBranching ? 'You need additional permissions to enable branching' : undefined, }, }} > Enable branching
) } export const PullRequestsEmptyState = ({ url, hasBranches, }: { url: string hasBranches: boolean }) => { return (

No pull requests made yet for this repository

Only pull requests with the ./migration directory changes will show here.

{hasBranches && (

Create a pull request

Not sure what to do?

Browse our documentation

)}
) } export const PreviewBranchesEmptyState = ({ onSelectCreateBranch, }: { onSelectCreateBranch: () => void }) => { return (

No database preview branches

Database preview branches will be shown here

Create a preview branch

Start developing in preview

Not sure what to do?

Browse our documentation

) }