mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
import React from 'react';
|
|
import { Switch, Route } from 'react-router';
|
|
import classNames from 'classnames';
|
|
|
|
import Sidebar from 'components/Sidebar/Sidebar';
|
|
import DashboardContent from 'components/Dashboard/DashboardContent';
|
|
import DialogsContainer from 'components/DialogsContainer';
|
|
import PreferencesContent from 'components/Preferences/PreferencesContent';
|
|
import PreferencesSidebar from 'components/Preferences/PreferencesSidebar';
|
|
import Search from 'containers/GeneralSearch/Search';
|
|
import withDashboard from 'containers/Dashboard/withDashboard';
|
|
|
|
import { compose } from 'utils';
|
|
|
|
function Dashboard({ sidebarExpended }) {
|
|
return (
|
|
<div className={classNames('dashboard', {
|
|
'has-mini-sidebar': !sidebarExpended,
|
|
})}>
|
|
<Switch>
|
|
<Route path="/preferences">
|
|
<Sidebar />
|
|
<PreferencesSidebar />
|
|
<PreferencesContent />
|
|
</Route>
|
|
|
|
<Route path="/">
|
|
<Sidebar />
|
|
<DashboardContent />
|
|
</Route>
|
|
</Switch>
|
|
|
|
<Search />
|
|
<DialogsContainer />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default compose(
|
|
withDashboard(({ sidebarExpended }) => ({
|
|
sidebarExpended,
|
|
})),
|
|
)(Dashboard);
|