Blame view

imports/ui/components/public-navigation.js 665 Bytes
2b1ad7917   tmcdeveloper   wip moving to Met...
1
  import React from 'react';
b2b910457   tmcdeveloper   wire up duct tape...
2
  import { Link } from 'react-router';
2b1ad7917   tmcdeveloper   wip moving to Met...
3
  import { Nav, NavItem } from 'react-bootstrap';
b2b910457   tmcdeveloper   wire up duct tape...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  export const PublicNavigation = React.createClass({
    isActive( route, indexOnly ) {
      return this.props.activeRoute( route, indexOnly ) ? 'active' : '';
    },
    handleRouteChange() {
     this.forceUpdate();
    },
    render() {
      return <Nav pullRight>
        <li className={ this.isActive( '/signup' ) } onClick={ this.handleRouteChange }>
          <Link to="/signup">Sign Up</Link>
        </li>
        <li className={ this.isActive( '/login' ) } onClick={ this.handleRouteChange }>
          <Link to="/login">Log In</Link>
        </li>
      </Nav>;
    }
  });