Skip to content

Commit 9c5e67b

Browse files
skipjackbebraw
authored andcommitted
refactor(sidebar-mobile): minor formatting fixes
1 parent 58bb621 commit 9c5e67b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

components/sidebar-mobile/sidebar-mobile.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ let initialTouchPosition = {};
55
let lastTouchPosition = {};
66

77
export default class SidebarMobile extends React.Component {
8-
constructor(props) {
9-
super(props);
10-
11-
this._handleBodyClick = this._handleBodyClick.bind(this);
12-
}
13-
148
render() {
159
return (
1610
<nav
@@ -66,6 +60,7 @@ export default class SidebarMobile extends React.Component {
6660
return this.props.sections.map(section => {
6761
let active = pathname === section.url || pathname.includes(`/${section.url}`),
6862
absoluteUrl = `/${section.url}`;
63+
6964
return (
7065
<div
7166
className={ `sidebar-mobile__section ${active ? 'sidebar-mobile__section--active' : ''}` }
@@ -118,7 +113,7 @@ export default class SidebarMobile extends React.Component {
118113
*
119114
* @param {object} e - Native click event
120115
*/
121-
_handleBodyClick(e) {
116+
_handleBodyClick = e => {
122117
if (
123118
!e.target.classList.contains('icon-menu') &&
124119
!this.container.contains(e.target)

0 commit comments

Comments
 (0)