Blame view

imports/ui/components/app-navigation.js 757 Bytes
2b1ad7917   tmcdeveloper   wip moving to Met...
1
2
  import React from 'react';
  import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
f7c1860b5   tmcdeveloper   add basic accepta...
3
  import { Link } from 'react-router';
2b1ad7917   tmcdeveloper   wip moving to Met...
4
5
6
7
  import { PublicNavigation } from './public-navigation';
  import { AuthenticatedNavigation } from './authenticated-navigation';
  
  export class AppNavigation extends React.Component {
b9fec275b   tmcdeveloper   add fix for activ...
8
9
    renderNavigation( hasUser ) {
      return hasUser ? <AuthenticatedNavigation /> : <PublicNavigation />;
2b1ad7917   tmcdeveloper   wip moving to Met...
10
11
12
13
14
15
    }
  
    render() {
      return <Navbar>
        <Navbar.Header>
          <Navbar.Brand>
f7c1860b5   tmcdeveloper   add basic accepta...
16
            <Link to="/">Application Name</Link>
2b1ad7917   tmcdeveloper   wip moving to Met...
17
          </Navbar.Brand>
f7c1860b5   tmcdeveloper   add basic accepta...
18
          <Navbar.Toggle />
2b1ad7917   tmcdeveloper   wip moving to Met...
19
        </Navbar.Header>
f7c1860b5   tmcdeveloper   add basic accepta...
20
        <Navbar.Collapse>
b9fec275b   tmcdeveloper   add fix for activ...
21
          { this.renderNavigation( this.props.hasUser ) }
f7c1860b5   tmcdeveloper   add basic accepta...
22
        </Navbar.Collapse>
2b1ad7917   tmcdeveloper   wip moving to Met...
23
24
25
      </Navbar>;
    }
  }