wip Pup 1.0.0
This commit is contained in:
commit
cdc15f019d
48 changed files with 1100 additions and 0 deletions
33
imports/ui/components/Navigation/Navigation.js
Normal file
33
imports/ui/components/Navigation/Navigation.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Navbar } from 'react-bootstrap';
|
||||
import { Link } from 'react-router-dom';
|
||||
import PublicNavigation from '../PublicNavigation/PublicNavigation';
|
||||
import AuthenticatedNavigation from '../AuthenticatedNavigation/AuthenticatedNavigation';
|
||||
|
||||
import './Navigation.scss';
|
||||
|
||||
const Navigation = ({ authenticated, name }) => (
|
||||
<Navbar>
|
||||
<Navbar.Header>
|
||||
<Navbar.Brand>
|
||||
<Link to="/">Pup</Link>
|
||||
</Navbar.Brand>
|
||||
<Navbar.Toggle />
|
||||
</Navbar.Header>
|
||||
<Navbar.Collapse>
|
||||
{!authenticated ? <PublicNavigation /> : <AuthenticatedNavigation name={name} />}
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
|
||||
Navigation.defaultProps = {
|
||||
name: PropTypes.string,
|
||||
};
|
||||
|
||||
Navigation.propTypes = {
|
||||
authenticated: PropTypes.bool.isRequired,
|
||||
name: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Navigation;
|
||||
Loading…
Add table
Add a link
Reference in a new issue