const React = require('react')
const { dispatcher } = require('../lib/dispatcher')
class Header extends React.Component {
render () {
const loc = this.props.state.location
return (
{this.getTitle()}
chevron_left
chevron_right
{this.getAddButton()}
)
}
getTitle () {
if (process.platform !== 'darwin') return null
const state = this.props.state
return ({state.window.title}
)
}
getAddButton () {
const state = this.props.state
if (state.location.url() !== 'home') return null
return (
add
)
}
}
module.exports = Header