Skip to content

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

Show loader while permissions are loading

Joshen Lim657cc8ec6874
diff --git a/studio/components/interfaces/Home/ProjectList/ProjectList.tsx b/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
index d4a8fbd0840..59ff713cca6 100644
--- a/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
+++ b/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
@@ -16,10 +16,12 @@ interface Props {
const ProjectList: FC<Props> = ({ rewriteHref }) => {
const router = useRouter()
- const { app } = useStore()
+ const { app, ui } = useStore()
const { organizations, projects } = app
const { isLoading: isLoadingProjects } = projects
+ const isLoadingPermissions = (ui?.permissions ?? []).length === 0
+
return (
<>
{organizations.list().map((org: Organization) => {
@@ -33,7 +35,7 @@ const ProjectList: FC<Props> = ({ rewriteHref }) => {
return (
<div className="space-y-3" key={makeRandomString(5)}>
<h4 className="text-lg">{name}</h4>
- {isLoadingProjects ? (
+ {isLoadingPermissions || isLoadingProjects ? (
<ul className="mx-auto grid grid-cols-1 gap-4 sm:grid-cols-1 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 ">
<ShimmeringCard />
<ShimmeringCard />