object destructure + let/const

This commit is contained in:
Devin Howard 2016-08-02 09:20:19 +08:00 committed by Connor Turland
parent 2b2f6e6dc4
commit 1774f8c530

View file

@ -2,10 +2,10 @@ import React, { Component, PropTypes } from 'react'
class Header extends Component {
render = () => {
const signedIn = this.props.signedIn
const section = this.props.section
var activeClass = (title) => {
var forClass = "exploreMapsButton"
const { signedIn, section } = this.props
const activeClass = (title) => {
let forClass = "exploreMapsButton"
forClass += " " + title + "Maps"
if (title == "my" && section == "mine" ||
title == section) forClass += " active"