Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Scaffold branch management page empty state

Joshen Limf2f039286cb8
diff --git a/studio/components/interfaces/BranchManagement/BranchManagement.tsx b/studio/components/interfaces/BranchManagement/BranchManagement.tsx
index c18f2a213ff..e77266525d0 100644
--- a/studio/components/interfaces/BranchManagement/BranchManagement.tsx
+++ b/studio/components/interfaces/BranchManagement/BranchManagement.tsx
@@ -26,6 +26,7 @@ import PreviewBranches from './PreviewBranches'
import PullRequests from './PullRequests'
import ConfirmationModal from 'components/ui/ConfirmationModal'
import { useBranchesDisableMutation } from 'data/branches/branches-disable-mutation'
+import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState'
const BranchManagement = () => {
const { ui } = useStore()
@@ -85,7 +86,7 @@ const BranchManagement = () => {
if (!hasBranchEnabled) {
// [Joshen] Some empty state here
- return <div>Some disabled state</div>
+ return <ProductEmptyState title="Hello">World</ProductEmptyState>
}
return (
diff --git a/studio/components/to-be-cleaned/ProductEmptyState.tsx b/studio/components/to-be-cleaned/ProductEmptyState.tsx
index 33ee6b1e1a8..09eaff00b57 100644
--- a/studio/components/to-be-cleaned/ProductEmptyState.tsx
+++ b/studio/components/to-be-cleaned/ProductEmptyState.tsx
@@ -1,11 +1,10 @@
-import { Button, IconExternalLink } from 'ui'
-import { FC, ReactNode } from 'react'
import * as Tooltip from '@radix-ui/react-tooltip'
+import { PropsWithChildren } from 'react'
+import { Button, IconExternalLink } from 'ui'
-interface Props {
+interface ProductEmptyStateProps {
title?: string
size?: 'medium' | 'large'
- children?: ReactNode
ctaButtonLabel?: string
infoButtonLabel?: string
infoButtonUrl?: string
@@ -14,7 +13,7 @@ interface Props {
disabledMessage?: string
}
-const ProductEmptyState: FC<Props> = ({
+const ProductEmptyState = ({
title = '',
size = 'medium',
children,
@@ -24,7 +23,7 @@ const ProductEmptyState: FC<Props> = ({
onClickCta = () => {},
disabled = false,
disabledMessage = '',
-}) => {
+}: PropsWithChildren<ProductEmptyStateProps>) => {
const hasAction = (ctaButtonLabel && onClickCta) || (infoButtonUrl && infoButtonLabel)
return (