File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,6 @@ let initialTouchPosition = {};
5
5
let lastTouchPosition = { } ;
6
6
7
7
export default class SidebarMobile extends React . Component {
8
- constructor ( props ) {
9
- super ( props ) ;
10
-
11
- this . _handleBodyClick = this . _handleBodyClick . bind ( this ) ;
12
- }
13
-
14
8
render ( ) {
15
9
return (
16
10
< nav
@@ -66,6 +60,7 @@ export default class SidebarMobile extends React.Component {
66
60
return this . props . sections . map ( section => {
67
61
let active = pathname === section . url || pathname . includes ( `/${ section . url } ` ) ,
68
62
absoluteUrl = `/${ section . url } ` ;
63
+
69
64
return (
70
65
< div
71
66
className = { `sidebar-mobile__section ${ active ? 'sidebar-mobile__section--active' : '' } ` }
@@ -118,7 +113,7 @@ export default class SidebarMobile extends React.Component {
118
113
*
119
114
* @param {object } e - Native click event
120
115
*/
121
- _handleBodyClick ( e ) {
116
+ _handleBodyClick = e => {
122
117
if (
123
118
! e . target . classList . contains ( 'icon-menu' ) &&
124
119
! this . container . contains ( e . target )
You can’t perform that action at this time.
0 commit comments