diff --git a/apps/frontend/src/components/layout/organization.selector.tsx b/apps/frontend/src/components/layout/organization.selector.tsx index f4f74c1f..1c49183d 100644 --- a/apps/frontend/src/components/layout/organization.selector.tsx +++ b/apps/frontend/src/components/layout/organization.selector.tsx @@ -13,7 +13,7 @@ export const OrganizationSelector = () => { return await (await fetch('/user/organizations')).json(); }, []); - const { data } = useSWR('organizations', load, { + const { isLoading, data } = useSWR('organizations', load, { revalidateIfStale: false, revalidateOnFocus: false, refreshWhenOffline: false, @@ -41,6 +41,10 @@ export const OrganizationSelector = () => { [] ); + if (isLoading || !isLoading && data?.length === 0) { + return null; + } + return (