Basic navs and auth pages working·
This commit is contained in:
parent
33e8a9f384
commit
3ef6f3c80b
20 changed files with 222 additions and 33 deletions
|
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||
import { withRouter } from 'react-router-dom';
|
||||
import { LinkContainer } from 'react-router-bootstrap';
|
||||
import { Nav, NavDropdown } from 'react-bootstrap';
|
||||
import { translate, Trans } from 'react-i18next';
|
||||
/*
|
||||
FIXME:
|
||||
navitem needs a nav-link class but does not works
|
||||
|
|
@ -14,7 +15,7 @@ import NavItem from '../NavItem/NavItem';
|
|||
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
const AuthenticatedNavigation = ({ name, history }) => (
|
||||
const AuthenticatedNavigation = ({ name, history, props }) => (
|
||||
<Nav pullRight>
|
||||
<LinkContainer className="nav-item" anchorClassName="nav-link" to="/documents">
|
||||
<NavItem eventKey={1} href="/documents">Documents</NavItem>
|
||||
|
|
@ -23,7 +24,7 @@ const AuthenticatedNavigation = ({ name, history }) => (
|
|||
<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>
|
||||
<NavItem eventKey={2.2} onClick={() => history.push('/logout')} href="/logout"><Trans i18nKey="Cerrar sesión">Cerrar sesión</Trans></NavItem>
|
||||
</LinkContainer>
|
||||
</Nav>
|
||||
);
|
||||
|
|
@ -32,4 +33,4 @@ AuthenticatedNavigation.propTypes = {
|
|||
name: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default withRouter(AuthenticatedNavigation);
|
||||
export default translate([], { wait: true })(withRouter(AuthenticatedNavigation));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue