Skip to content

Instantly share code, notes, and snippets.

@prewk
Forked from anonymous/component
Last active January 13, 2016 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prewk/4abf9b3481764528364d to your computer and use it in GitHub Desktop.
Save prewk/4abf9b3481764528364d to your computer and use it in GitHub Desktop.
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