From 4da610a2b36f665dbdc20f9e706139a122edc6fb Mon Sep 17 00:00:00 2001 From: Andrey Okonetchnikov Date: Fri, 16 Sep 2016 15:01:19 +0200 Subject: [PATCH] Better names for methods. Fixes ESLint warnings. --- src/components/UI/AppHeader/AppHeader.js | 30 ++++++++++++++---------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/components/UI/AppHeader/AppHeader.js b/src/components/UI/AppHeader/AppHeader.js index f91a3f78..73759a46 100644 --- a/src/components/UI/AppHeader/AppHeader.js +++ b/src/components/UI/AppHeader/AppHeader.js @@ -1,19 +1,13 @@ import React from 'react'; import pluralize from 'pluralize'; import { IndexLink } from 'react-router'; -import { Menu, MenuItem, Button } from 'react-toolbox'; +import { Menu, MenuItem, Button, IconButton } from 'react-toolbox'; import AppBar from 'react-toolbox/lib/app_bar'; import FindBar from '../FindBar/FindBar'; import styles from './AppHeader.css'; export default class AppHeader extends React.Component { - // props: { - // // collections: React., - // // commands, - // // defaultCommands - // } - state = { createMenuActive: false } @@ -25,20 +19,26 @@ export default class AppHeader extends React.Component { } } - onCreateButtonClick = () => { + handleCreateButtonClick = () => { this.setState({ createMenuActive: true }); } - onCreateMenuHide = () => { + handleCreateMenuHide = () => { this.setState({ createMenuActive: false }); } render() { - const { collections, commands, defaultCommands, runCommand } = this.props; + const { + collections, + commands, + defaultCommands, + runCommand, + toggleNavDrawer + } = this.props; const { createMenuActive } = this.state; return ( @@ -46,6 +46,11 @@ export default class AppHeader extends React.Component { fixed theme={styles} > + Dashboard @@ -59,12 +64,12 @@ export default class AppHeader extends React.Component { icon='add' floating accent - onClick={this.onCreateButtonClick} + onClick={this.handleCreateButtonClick} > { collections.valueSeq().map(collection => @@ -78,6 +83,7 @@ export default class AppHeader extends React.Component { } + ); }