-
-
Save prewk/4abf9b3481764528364d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from 'react-pure-render/component'; | |
import React, {PropTypes} from 'react'; | |
import {Link} from 'react-router'; | |
export default class Header extends Component { | |
static propTypes = { | |
msg: PropTypes.object.isRequired, | |
pathname: PropTypes.string.isRequired, | |
viewer: PropTypes.object | |
} | |
render() { | |
const {pathname, msg: {app: {links: msg}}, viewer} = this.props; | |
return ( | |
<header> | |
<h1> | |
<Link to="/">{msg.home}</Link> | |
</h1> | |
{pathname | |
? ( | |
<ul> | |
<li><Link activeClassName="active" to="/dummy-form">Test form</Link></li> | |
<li><Link activeClassName="active" to="/servis-kotlu">Servis kotlu</Link></li> | |
</ul> | |
) | |
: null} | |
</header> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment