mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: avoid display any dashboard before boot complete loading.
This commit is contained in:
@@ -8,9 +8,9 @@ import { useDashboardBoot } from './DashboardBoot';
|
||||
export default function DashboardProvider({ children }) {
|
||||
const { isLoading } = useDashboardBoot();
|
||||
|
||||
return (
|
||||
<DashboardAbilityProvider>
|
||||
{isLoading ? null : children}
|
||||
</DashboardAbilityProvider>
|
||||
);
|
||||
// Avoid display any dashboard component before complete booting.
|
||||
if (isLoading) {
|
||||
return null;
|
||||
}
|
||||
return <DashboardAbilityProvider>{children}</DashboardAbilityProvider>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user