import React from 'react' import { useSelector, useDispatch } from 'react-redux' import { CSidebar, CSidebarBrand, CSidebarNav, CSidebarToggler, CCreateNavItem, } from '@coreui/react' import CIcon from '@coreui/icons-react' // sidebar nav config import navigation from '../containers/_nav' const AppSidebar = () => { const dispatch = useDispatch() const unfoldable = useSelector((state) => state.sidebarUnfoldable) const sidebarShow = useSelector((state) => state.sidebarShow) return ( console.log('show')} onHide={() => { dispatch({ type: 'set', sidebarShow: false }) }} > dispatch({ type: 'set', sidebarUnfoldable: !unfoldable })} /> ) } export default React.memo(AppSidebar)