From 6266f27e771c3eddd0baff8356e1f29a74e8996f Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 31 Jul 2023 14:49:22 +0700 Subject: [PATCH] Fix minimizer ui --- src/containers/DefaultLayout/DefaultLayout.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/containers/DefaultLayout/DefaultLayout.js b/src/containers/DefaultLayout/DefaultLayout.js index 0ef378c..9fc5088 100644 --- a/src/containers/DefaultLayout/DefaultLayout.js +++ b/src/containers/DefaultLayout/DefaultLayout.js @@ -17,6 +17,7 @@ import { AppBreadcrumb2 as AppBreadcrumb, AppSidebarNav2 as AppSidebarNav, } from '@coreui/react'; +import LayoutHelper from '../../../node_modules/@coreui/react/lib/Shared/layout/layout'; import navigation from '../../_nav'; import routes from '../../routes'; import { emptyConstants } from '../../const/MapConst.js'; @@ -44,6 +45,7 @@ class DefaultLayout extends Component { routes2: routes, finalRoutes: [], breadrCrumbReady: false, + minimized: true } } @@ -70,7 +72,10 @@ class DefaultLayout extends Component { } } - + toggleMinimized = () => { + this.setState((prevState) => ({ minimized: !prevState.minimized })); + LayoutHelper.sidebarToggle(!this.state.minimized); + }; setFinalRoutes = () => { const { routes2 } = this.state; @@ -248,7 +253,7 @@ class DefaultLayout extends Component {
{!window.location.href.includes("dashboard-project") || renderSidebar ? ( - + {/*