Skip to content

Commit

Permalink
fix warning in App.js
Browse files Browse the repository at this point in the history
no-unused-vars
Line 39: 'LocationOnIcon' is defined but never used

default-case
Line 219: Expected a default case

jsx-a11y/alt-text
Line 235: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images
  • Loading branch information
zlargon committed Jul 8, 2018
1 parent 99bab4b commit 6c73e01
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import BottomNavigationAction from '@material-ui/core/BottomNavigationAction';
// Icon
import MenuIcon from '@material-ui/icons/Menu';
import SearchIcon from '@material-ui/icons/Search';
import LocationOnIcon from '@material-ui/icons/LocationOn';
import StarIcon from '@material-ui/icons/Star';

// MBTA
Expand Down Expand Up @@ -215,24 +214,16 @@ class App extends React.Component {
}

render () {
let toolBarTitle;
switch (this.state.panel) {
case 0:
toolBarTitle = this.lang('Search');
break;

case 1:
toolBarTitle = this.state.currentTime.toLocaleTimeString();
break;
}
const toolBarTitle = this.state.panel === 0 ?
this.lang('Search') : this.state.currentTime.toLocaleTimeString();

return (
<div style={{ textAlign: 'center' }}>

<Drawer open={this.state.drawer} onClose={this.toggleDrawer(false)} >
<List className="drawer">
<ListItem dense disableGutters >
<img src={logo} className="drawer-logo"/>
<img alt='' src={logo} className="drawer-logo"/>
</ListItem>
<Divider/>

Expand Down

0 comments on commit 6c73e01

Please sign in to comment.