This commit is contained in:
phamhieu authored and Joshen Lim committed 2022-03-16 10:28:29 +01:00
1 parent a3dfc3dd8d
commit 6ed2ebf404
1 file changed
+4 -8
+4 -8
View File
@@ -54,7 +54,6 @@ interface IVercelIntegrationStore {
}[]
isDeployButtonFlow: boolean
isSupabaseProjectListEmpty: boolean
integrationComplete: boolean
queryParams: Dictionary<string>
projectLinkRemaining: number
@@ -97,12 +96,6 @@ class VercelIntegrationStore implements IVercelIntegrationStore {
return !!this.currentProjectId
}
get isSupabaseProjectListEmpty() {
const { app } = useStore()
const projects = app.projects.list()
return projects.length == 0
}
// @ts-ignore
get queryParams() {
return {
@@ -191,6 +184,9 @@ type VercelIntegrationProps = {} & any
const VercelIntegration: FC<VercelIntegrationProps> = ({}) => {
// @ts-ignore
const _store: IVercelIntegrationStore = useLocalObservable(() => new VercelIntegrationStore())
const { app } = useStore()
const projects = app.projects.list()
const isSupabaseProjectListEmpty = projects.length == 0
useEffect(() => {
_store.loadInitialData()
@@ -203,7 +199,7 @@ const VercelIntegration: FC<VercelIntegrationProps> = ({}) => {
<Connecting />
) : _store.isDeployButtonFlow ? (
<IntegrationProject />
) : _store.isSupabaseProjectListEmpty ? (
) : isSupabaseProjectListEmpty ? (
<ProjectLinksEmptyState />
) : (
<ProjectLinks />