BT4 + header migration (wip)

This commit is contained in:
vjrj 2017-11-24 10:42:01 +01:00
parent e51e08f72a
commit 33e8a9f384
3 changed files with 16 additions and 22 deletions

View file

@ -1,3 +1,4 @@
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';*/

View file

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import { LinkContainer } from 'react-router-bootstrap';
import { Nav, NavDropdown, MenuItem } from 'react-bootstrap';
import { Nav, NavDropdown } from 'react-bootstrap';
/*
FIXME:
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
*/
import NavItem from '../NavItem/NavItem';
import { Meteor } from 'meteor/meteor';
const AuthenticatedNavigation = ({ name, history }) => (
<div>
{/*
https://github.com/react-bootstrap/react-bootstrap/blob/master/src/Nav.js */}
<Nav>
<Nav pullRight>
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/documents">
<NavItem eventKey={1} href="/documents">Documents</NavItem>
</LinkContainer>
</Nav>
<Nav pullRight>
<NavDropdown eventKey={2} title={name} id="user-nav-dropdown">
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/profile">
<NavItem eventKey={2.1} href="/profile">Profile</NavItem>
<NavItem eventKey={2.1} href="/profile">{name}</NavItem>
</LinkContainer>
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/logout">
<NavItem eventKey={2.2} onClick={() => history.push('/logout')} href="/logout">Logout</NavItem>
</LinkContainer>
<MenuItem divider />x
<MenuItem eventKey={2.2} onClick={() => history.push('/logout')}>Logout</MenuItem>
</NavDropdown>
</Nav>
</div>
);
AuthenticatedNavigation.propTypes = {

View file

@ -55,7 +55,6 @@ class NavItem extends React.Component {
} else if (props.role === 'tab') {
props['aria-selected'] = active;
}
return (
<li
role="presentation"