From 1774f8c530aed1e6f263b0892dbb9fbb6ab0955b Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Tue, 2 Aug 2016 09:20:19 +0800 Subject: [PATCH] object destructure + let/const --- frontend/src/components/Header.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js index e115b350..1764d74a 100644 --- a/frontend/src/components/Header.js +++ b/frontend/src/components/Header.js @@ -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"