mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-11 10:20:30 +00:00
17 lines
459 B
JavaScript
17 lines
459 B
JavaScript
import React from 'react';
|
|
import { DashboardAbilityProvider } from '../../components';
|
|
import { useDashboardBoot } from './DashboardBoot';
|
|
|
|
/**
|
|
* Dashboard provider.
|
|
*/
|
|
export default function DashboardProvider({ children }) {
|
|
const { isLoading } = useDashboardBoot();
|
|
|
|
// Avoid display any dashboard component before complete booting.
|
|
if (isLoading) {
|
|
return null;
|
|
}
|
|
return <DashboardAbilityProvider>{children}</DashboardAbilityProvider>;
|
|
}
|