mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: split the preferences pages
This commit is contained in:
@@ -1,35 +1,37 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import React, { lazy } from 'react';
|
||||
import { Switch, Route } from 'react-router';
|
||||
|
||||
import Dashboard from '@/components/Dashboard/Dashboard';
|
||||
import SetupWizardPage from '@/containers/Setup/WizardSetupPage';
|
||||
|
||||
import EnsureOrganizationIsReady from '../Guards/EnsureOrganizationIsReady';
|
||||
import EnsureOrganizationIsNotReady from '../Guards/EnsureOrganizationIsNotReady';
|
||||
import { PrivatePagesProvider } from './PrivatePagesProvider';
|
||||
import EnsureOrganizationIsReady from '../Guards/EnsureOrganizationIsReady';
|
||||
import { EnsureAuthenticated } from '../Guards/EnsureAuthenticated';
|
||||
import { EnsureUserEmailVerified } from '../Guards/EnsureUserEmailVerified';
|
||||
|
||||
import '@/style/pages/Dashboard/Dashboard.scss';
|
||||
|
||||
const SetupWizardPage = lazy(
|
||||
() => import('@/containers/Setup/WizardSetupPage'),
|
||||
);
|
||||
/**
|
||||
* Dashboard inner private pages.
|
||||
*/
|
||||
export default function DashboardPrivatePages() {
|
||||
return (
|
||||
<PrivatePagesProvider>
|
||||
<Switch>
|
||||
<Route path={'/setup'}>
|
||||
<EnsureOrganizationIsNotReady>
|
||||
<SetupWizardPage />
|
||||
</EnsureOrganizationIsNotReady>
|
||||
</Route>
|
||||
|
||||
<Route path="/">
|
||||
<EnsureOrganizationIsReady>
|
||||
<Dashboard />
|
||||
</EnsureOrganizationIsReady>
|
||||
</Route>
|
||||
</Switch>
|
||||
</PrivatePagesProvider>
|
||||
<EnsureAuthenticated>
|
||||
<EnsureUserEmailVerified>
|
||||
<PrivatePagesProvider>
|
||||
<Switch>
|
||||
<Route path={'/setup'} children={<SetupWizardPage />} />
|
||||
<Route path="/">
|
||||
<EnsureOrganizationIsReady>
|
||||
<Dashboard />
|
||||
</EnsureOrganizationIsReady>
|
||||
</Route>
|
||||
</Switch>
|
||||
</PrivatePagesProvider>
|
||||
</EnsureUserEmailVerified>
|
||||
</EnsureAuthenticated>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user