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