diff --git a/client/package.json b/client/package.json index 25dab72d7..e7d8b7964 100644 --- a/client/package.json +++ b/client/package.json @@ -77,12 +77,15 @@ "react-redux": "^7.1.3", "react-router-breadcrumbs-hoc": "^3.2.10", "react-router-dom": "^5.1.2", + "react-scroll-sync": "^0.7.1", "react-scrollbars-custom": "^4.0.21", "react-sortablejs": "^2.0.11", "react-table": "^7.0.0", + "react-table-sticky": "^1.1.2", "react-use": "^13.26.1", "react-window": "^1.8.5", "redux": "^4.0.5", + "redux-localstorage": "^0.4.1", "redux-thunk": "^2.3.0", "resolve": "1.15.0", "resolve-url-loader": "3.1.1", diff --git a/client/src/components/App.js b/client/src/components/App.js index 7d6496314..e68fd59db 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -9,7 +9,6 @@ import PrivateRoute from 'components/PrivateRoute'; import Authentication from 'components/Authentication'; import Dashboard from 'components/Dashboard/Dashboard'; import GlobalErrors from 'containers/GlobalErrors/GlobalErrors'; -import AuthenticationDialogs from 'containers/Authentication/AuthenticationDialogs'; import messages from 'lang/en'; import 'style/App.scss'; @@ -30,7 +29,6 @@ function App({ locale }) { - diff --git a/client/src/components/Dashboard/Dashboard.js b/client/src/components/Dashboard/Dashboard.js index e2d5f189a..38887f7ed 100644 --- a/client/src/components/Dashboard/Dashboard.js +++ b/client/src/components/Dashboard/Dashboard.js @@ -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 ( -
+
- + - + @@ -28,3 +35,9 @@ export default function Dashboard() {
); } + +export default compose( + withDashboard(({ sidebarExpended }) => ({ + sidebarExpended, + })), +)(Dashboard); diff --git a/client/src/components/Dashboard/DashboardTopbar.js b/client/src/components/Dashboard/DashboardTopbar.js index 0dbb29003..1bb520f25 100644 --- a/client/src/components/Dashboard/DashboardTopbar.js +++ b/client/src/components/Dashboard/DashboardTopbar.js @@ -14,14 +14,23 @@ import DashboardBreadcrumbs from 'components/Dashboard/DashboardBreadcrumbs'; import SearchConnect from 'connectors/Search.connect'; import Icon from 'components/Icon'; +import withDashboardActions from 'containers/Dashboard/withDashboardActions'; +import withDashboard from 'containers/Dashboard/withDashboard'; + import { compose } from 'utils'; function DashboardTopbar({ + + // #withDashboard pageTitle, pageSubtitle, editViewId, - globalSearchShow, + + // #withDashboardActions + toggleSidebarExpend, + + // #withGlobalSearch openGlobalSearch, }) { const history = useHistory(); @@ -38,11 +47,15 @@ function DashboardTopbar({ onClick={handlerClickEditView} /> ); + + const handleSidebarToggleBtn = () => { + toggleSidebarExpend(); + }; return (
-