Blame view

imports/ui/components/app-navigation.js 649 Bytes
2b1ad7917   tmcdeveloper   wip moving to Met...
1
2
3
4
5
6
  import React from 'react';
  import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
  import { PublicNavigation } from './public-navigation';
  import { AuthenticatedNavigation } from './authenticated-navigation';
  
  export class AppNavigation extends React.Component {
7df77f0fa   tmcdeveloper   finish wiring up ...
7
    renderNavigation( hasUser, location ) {
2b1ad7917   tmcdeveloper   wip moving to Met...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
      return hasUser ? <AuthenticatedNavigation /> : <PublicNavigation />;
    }
  
    render() {
      return <Navbar>
        <Navbar.Header>
          <Navbar.Brand>
            <a href="/">Application Name</a>
          </Navbar.Brand>
        </Navbar.Header>
        { this.renderNavigation( this.props.hasUser ) }
      </Navbar>;
    }
  }