BT4 + header migration (wip)
This commit is contained in:
parent
e51e08f72a
commit
33e8a9f384
3 changed files with 16 additions and 22 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
import '../imports/startup/client';
|
import '../imports/startup/client';
|
||||||
/* import '../node_modules/daemonite-material/js/material.min.js';
|
/*
|
||||||
* import '../node_modules/daemonite-material/css/material.css';*/
|
import '../node_modules/daemonite-material/js/material.min.js';
|
||||||
|
import '../node_modules/daemonite-material/css/material.css';*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { LinkContainer } from 'react-router-bootstrap';
|
import { LinkContainer } from 'react-router-bootstrap';
|
||||||
import { Nav, NavDropdown, MenuItem } from 'react-bootstrap';
|
import { Nav, NavDropdown } from 'react-bootstrap';
|
||||||
/*
|
/*
|
||||||
FIXME:
|
FIXME:
|
||||||
navitem needs a nav-link class but does not works
|
navitem needs a nav-link class but does not works
|
||||||
|
|
@ -11,27 +11,21 @@ import { Nav, NavDropdown, MenuItem } from 'react-bootstrap';
|
||||||
so we did a custom NavLink
|
so we did a custom NavLink
|
||||||
*/
|
*/
|
||||||
import NavItem from '../NavItem/NavItem';
|
import NavItem from '../NavItem/NavItem';
|
||||||
|
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
|
|
||||||
const AuthenticatedNavigation = ({ name, history }) => (
|
const AuthenticatedNavigation = ({ name, history }) => (
|
||||||
<div>
|
<Nav pullRight>
|
||||||
{/*
|
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/documents">
|
||||||
https://github.com/react-bootstrap/react-bootstrap/blob/master/src/Nav.js */}
|
<NavItem eventKey={1} href="/documents">Documents</NavItem>
|
||||||
<Nav>
|
</LinkContainer>
|
||||||
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/documents">
|
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/profile">
|
||||||
<NavItem eventKey={1} href="/documents">Documents</NavItem>
|
<NavItem eventKey={2.1} href="/profile">{name}</NavItem>
|
||||||
</LinkContainer>
|
</LinkContainer>
|
||||||
</Nav>
|
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/logout">
|
||||||
<Nav pullRight>
|
<NavItem eventKey={2.2} onClick={() => history.push('/logout')} href="/logout">Logout</NavItem>
|
||||||
<NavDropdown eventKey={2} title={name} id="user-nav-dropdown">
|
</LinkContainer>
|
||||||
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/profile">
|
</Nav>
|
||||||
<NavItem eventKey={2.1} href="/profile">Profile</NavItem>
|
|
||||||
</LinkContainer>
|
|
||||||
<MenuItem divider />x
|
|
||||||
<MenuItem eventKey={2.2} onClick={() => history.push('/logout')}>Logout</MenuItem>
|
|
||||||
</NavDropdown>
|
|
||||||
</Nav>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
AuthenticatedNavigation.propTypes = {
|
AuthenticatedNavigation.propTypes = {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ class NavItem extends React.Component {
|
||||||
} else if (props.role === 'tab') {
|
} else if (props.role === 'tab') {
|
||||||
props['aria-selected'] = active;
|
props['aria-selected'] = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
role="presentation"
|
role="presentation"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue