mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
fix: use isLoaded in stores
This commit is contained in:
1 parent
5146cbc4cb
commit
dae4aeac09
5 files changed
+5
-5
No files matched your search
@@ -20,7 +20,7 @@ const PageLayout = ({ children }: { children?: React.ReactNode }) => {
|
||||
functions.load()
|
||||
}, [ui.selectedProject])
|
||||
|
||||
if (!functions.list()) {
|
||||
if (!functions.isLoaded) {
|
||||
return (
|
||||
<BaseLayout>
|
||||
<Loading active={true}>loading</Loading>
|
||||
|
||||
@@ -19,7 +19,7 @@ const PageLayout = ({ children, centered }: { children?: React.ReactNode; center
|
||||
functions.load()
|
||||
}, [ui.selectedProject])
|
||||
|
||||
if (!functions.isInitialized) {
|
||||
if (!functions.isLoaded) {
|
||||
return (
|
||||
<BaseLayout>
|
||||
<Loading active={true}>loading</Loading>
|
||||
|
||||
@@ -18,7 +18,7 @@ const PageLayout = ({
|
||||
content.load()
|
||||
}, [ui.selectedProject])
|
||||
|
||||
if (!content.isInitialized) {
|
||||
if (!content.isLoaded) {
|
||||
return (
|
||||
<BaseLayout>
|
||||
<Loading active={true}>loading</Loading>
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class ProjectContentStore implements IProjectContentStore {
|
||||
}
|
||||
|
||||
get isLoaded() {
|
||||
return this.state !== this.STATES.LOADED
|
||||
return this.state === this.STATES.LOADED
|
||||
}
|
||||
|
||||
async fetchData() {
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class ProjectFunctionsStore implements IProjectFunctionsStore {
|
||||
}
|
||||
|
||||
get isLoaded() {
|
||||
return this.state !== this.STATES.LOADED
|
||||
return this.state === this.STATES.LOADED
|
||||
}
|
||||
|
||||
async fetchData() {
|
||||
|
||||
Reference in new issue
Block a user