- Data table sticky header.

- Mini sidebar toggle.
- Refactor withDashboard and withDashboardActions.
This commit is contained in:
Ahmed Bouhuolia
2020-05-31 15:57:02 +02:00
parent c1659d191f
commit 2a466ce2da
49 changed files with 1045 additions and 669 deletions

View File

@@ -1,23 +1,30 @@
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';
export default function Dashboard() {
import { compose } from 'utils';
function Dashboard({ sidebarExpended }) {
return (
<div className='dashboard'>
<div className={classNames('dashboard', {
'has-mini-sidebar': !sidebarExpended,
})}>
<Switch>
<Route path='/preferences'>
<Route path="/preferences">
<Sidebar />
<PreferencesSidebar />
<PreferencesContent />
</Route>
<Route path='/'>
<Route path="/">
<Sidebar />
<DashboardContent />
</Route>
@@ -28,3 +35,9 @@ export default function Dashboard() {
</div>
);
}
export default compose(
withDashboard(({ sidebarExpended }) => ({
sidebarExpended,
})),
)(Dashboard);