Generic template with i18next
This commit is contained in:
parent
5b311446dc
commit
403a108dba
15 changed files with 242 additions and 77 deletions
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import { year } from '@cleverbeagle/dates';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Grid } from 'react-bootstrap';
|
||||
import { translate } from 'react-i18next';
|
||||
|
||||
import './Footer.scss';
|
||||
|
||||
|
|
@ -10,18 +11,21 @@ const copyrightYear = () => {
|
|||
return currentYear === '2017' ? '2017' : `2017-${currentYear}`;
|
||||
};
|
||||
|
||||
const Footer = () => (
|
||||
const Footer = (props) => {
|
||||
const { t } = props;
|
||||
return (
|
||||
<div className="Footer">
|
||||
<Grid>
|
||||
<p className="pull-left">© {copyrightYear()} Application Name</p>
|
||||
<p className="pull-left">© Copyleft {copyrightYear()} {t('OrgNameFull')}</p>
|
||||
<ul className="pull-right">
|
||||
<li><Link to="/terms">Terms<span className="hidden-xs"> of Service</span></Link></li>
|
||||
<li><Link to="/privacy">Privacy<span className="hidden-xs"> Policy</span></Link></li>
|
||||
<li><Link to="/terms"> {t('Términos')}<span className="hidden-xs"> {t('de Servicio')}</span></Link></li>
|
||||
<li><Link to="/privacidad">{t('Política')}<span className="hidden-xs"> {t('de Privacidad')}</span></Link></li>
|
||||
</ul>
|
||||
</Grid>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
Footer.propTypes = {};
|
||||
|
||||
export default Footer;
|
||||
export default translate([], { wait: true })(Footer);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { Navbar } from 'react-bootstrap';
|
|||
import { Link } from 'react-router-dom';
|
||||
import PublicNavigation from '../PublicNavigation/PublicNavigation';
|
||||
import AuthenticatedNavigation from '../AuthenticatedNavigation/AuthenticatedNavigation';
|
||||
import { translate } from 'react-i18next';
|
||||
|
||||
import './Navigation.scss';
|
||||
|
||||
|
|
@ -11,7 +12,7 @@ const Navigation = props => (
|
|||
<Navbar>
|
||||
<Navbar.Header>
|
||||
<Navbar.Brand>
|
||||
<Link to="/">Pup</Link>
|
||||
<Link to="/">{props.t('AppName')}</Link>
|
||||
</Navbar.Brand>
|
||||
<Navbar.Toggle />
|
||||
</Navbar.Header>
|
||||
|
|
@ -29,4 +30,6 @@ Navigation.propTypes = {
|
|||
authenticated: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default Navigation;
|
||||
// export default Navigation;
|
||||
|
||||
export default translate([], { wait: true })(Navigation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue