diff --git a/packages/client/src/components/admin-layout/index.tsx b/packages/client/src/components/admin-layout/index.tsx index 504292b22..e6b1b934e 100644 --- a/packages/client/src/components/admin-layout/index.tsx +++ b/packages/client/src/components/admin-layout/index.tsx @@ -31,6 +31,7 @@ import { PageTitleProvider, usePageTitleContext, CollectionsProvider, + useCollectionsContext, } from '../../constate'; function DesignableToggle() { @@ -106,6 +107,7 @@ function LayoutWithMenu(props: LayoutWithMenuProps) { } function Content({ activeKey }) { + const { loading: collectionsLoading } = useCollectionsContext(); const { data = {}, loading } = useRequest( `ui_schemas:getTree?filter[parentKey]=${activeKey}`, { @@ -114,7 +116,7 @@ function Content({ activeKey }) { }, ); - if (loading) { + if (loading || collectionsLoading) { return ; }