allow app skeleton to display while config is loading

This commit is contained in:
Keith Grant
2020-09-17 12:31:13 -07:00
parent 6c4f9364ee
commit cde8cb57da

View File

@@ -76,10 +76,6 @@ function AppContainer({ i18n, navRouteConfig = [], children }) {
loadConfig(); loadConfig();
}, [config, pathname, handleLogout]); }, [config, pathname, handleLogout]);
if (!isReady) {
return null;
}
const header = ( const header = (
<PageHeader <PageHeader
showNavToggle showNavToggle
@@ -119,7 +115,7 @@ function AppContainer({ i18n, navRouteConfig = [], children }) {
return ( return (
<> <>
<Page isManagedSidebar header={header} sidebar={sidebar}> <Page isManagedSidebar header={header} sidebar={sidebar}>
<ConfigProvider value={config}>{children}</ConfigProvider> {isReady && <ConfigProvider value={config}>{children}</ConfigProvider>}
</Page> </Page>
<About <About
ansible_version={config?.ansible_version} ansible_version={config?.ansible_version}