File tree Expand file tree Collapse file tree 4 files changed +212
-211
lines changed
Expand file tree Collapse file tree 4 files changed +212
-211
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717} from "@material-ui/icons" ;
1818import classNames from 'classnames' ;
1919
20- import SidebarLink from './components/SidebarLink' ;
20+ import SidebarLink from './components/SidebarLink/SidebarLinkContainer ' ;
2121import Dot from './components/Dot' ;
2222
2323const structure = [
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { compose , withState , withHandlers } from 'recompose' ;
2+
3+ import SidebarLinkView from './SidebarLinkView' ;
4+
5+ export default compose (
6+ withState ( 'isOpen' , 'setIsOpen' , false ) ,
7+ withHandlers ( {
8+ toggleCollapse : ( props ) => ( e ) => {
9+ if ( props . isSidebarOpened ) {
10+ e . preventDefault ( ) ;
11+
12+ props . setIsOpen ( ! props . isOpen ) ;
13+ }
14+ } ,
15+ } ) ,
16+ ) ( SidebarLinkView ) ;
You can’t perform that action at this time.
0 commit comments