mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix: hotbug in dashboard lazy loading resources.
This commit is contained in:
@@ -5,7 +5,7 @@ import { createBrowserHistory } from 'history';
|
|||||||
import { ReactQueryConfigProvider } from 'react-query';
|
import { ReactQueryConfigProvider } from 'react-query';
|
||||||
import { ReactQueryDevtools } from 'react-query-devtools';
|
import { ReactQueryDevtools } from 'react-query-devtools';
|
||||||
|
|
||||||
import PrivateRoute from 'components/PrivateRoute';
|
import PrivateRoute from 'components/Guards/PrivateRoute';
|
||||||
import Authentication from 'components/Authentication';
|
import Authentication from 'components/Authentication';
|
||||||
import DashboardPrivatePages from 'components/Dashboard/PrivatePages';
|
import DashboardPrivatePages from 'components/Dashboard/PrivatePages';
|
||||||
import GlobalErrors from 'containers/GlobalErrors/GlobalErrors';
|
import GlobalErrors from 'containers/GlobalErrors/GlobalErrors';
|
||||||
|
|||||||
@@ -7,15 +7,10 @@ import { FormattedMessage as T } from 'react-intl';
|
|||||||
import withAuthentication from 'containers/Authentication/withAuthentication';
|
import withAuthentication from 'containers/Authentication/withAuthentication';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import AuthCopyright from 'containers/Authentication/AuthCopyright';
|
|
||||||
|
|
||||||
function PageFade(props) {
|
function PageFade(props) {
|
||||||
return (
|
return (
|
||||||
<CSSTransition
|
<CSSTransition {...props} classNames="authTransition" timeout={500} />
|
||||||
{...props}
|
|
||||||
classNames="authTransition"
|
|
||||||
timeout={500}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import PreferencesContent from 'components/Preferences/PreferencesContent';
|
|||||||
import PreferencesSidebar from 'components/Preferences/PreferencesSidebar';
|
import PreferencesSidebar from 'components/Preferences/PreferencesSidebar';
|
||||||
import Search from 'containers/GeneralSearch/Search';
|
import Search from 'containers/GeneralSearch/Search';
|
||||||
import DashboardSplitPane from 'components/Dashboard/DashboardSplitePane';
|
import DashboardSplitPane from 'components/Dashboard/DashboardSplitePane';
|
||||||
import EnsureOrganizationIsReady from './EnsureOrganizationIsReady';
|
|
||||||
|
|
||||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ function Dashboard({
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EnsureOrganizationIsReady>
|
|
||||||
<DashboardLoadingIndicator isLoading={fetchOptions.isFetching}>
|
<DashboardLoadingIndicator isLoading={fetchOptions.isFetching}>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/preferences">
|
<Route path="/preferences">
|
||||||
@@ -49,7 +49,7 @@ function Dashboard({
|
|||||||
<Search />
|
<Search />
|
||||||
<DialogsContainer />
|
<DialogsContainer />
|
||||||
</DashboardLoadingIndicator>
|
</DashboardLoadingIndicator>
|
||||||
</EnsureOrganizationIsReady>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import DashboardLoadingIndicator from 'components/Dashboard/DashboardLoadingIndi
|
|||||||
import withOrganizationActions from 'containers/Organization/withOrganizationActions';
|
import withOrganizationActions from 'containers/Organization/withOrganizationActions';
|
||||||
import withSubscriptionsActions from 'containers/Subscriptions/withSubscriptionsActions';
|
import withSubscriptionsActions from 'containers/Subscriptions/withSubscriptionsActions';
|
||||||
|
|
||||||
|
import EnsureOrganizationIsReady from 'components/Guards/EnsureOrganizationIsReady';
|
||||||
|
import EnsureOrganizationIsNotReady from 'components/Guards/EnsureOrganizationIsNotReady';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,11 +42,15 @@ function DashboardPrivatePages({
|
|||||||
}>
|
}>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path={'/setup'}>
|
<Route path={'/setup'}>
|
||||||
<SetupWizardPage />
|
<EnsureOrganizationIsNotReady>
|
||||||
|
<SetupWizardPage />
|
||||||
|
</EnsureOrganizationIsNotReady>
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route path='/'>
|
<Route path='/'>
|
||||||
<Dashboard />
|
<EnsureOrganizationIsReady>
|
||||||
|
<Dashboard />
|
||||||
|
</EnsureOrganizationIsReady>
|
||||||
</Route>
|
</Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
</DashboardLoadingIndicator>
|
</DashboardLoadingIndicator>
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import EnsureOrganizationIsNotReady from './EnsureOrganizationIsNotReady';
|
|
||||||
import SetupRightSection from './SetupRightSection';
|
import SetupRightSection from './SetupRightSection';
|
||||||
import SetupLeftSection from './SetupLeftSection';
|
import SetupLeftSection from './SetupLeftSection';
|
||||||
|
|
||||||
|
|
||||||
export default function WizardSetupPage() {
|
export default function WizardSetupPage() {
|
||||||
return (
|
return (
|
||||||
<EnsureOrganizationIsNotReady>
|
<div class="setup-page">
|
||||||
<div class="setup-page">
|
<SetupLeftSection />
|
||||||
<SetupLeftSection />
|
<SetupRightSection />
|
||||||
<SetupRightSection />
|
</div>
|
||||||
</div>
|
|
||||||
</EnsureOrganizationIsNotReady>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user