2018-08-30 14:25:33 +00:00
|
|
|
import React, { Component } from 'react';
|
2018-10-29 03:26:19 +00:00
|
|
|
import { Trans, withNamespaces } from 'react-i18next';
|
2019-04-17 12:03:25 +00:00
|
|
|
import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants';
|
2018-11-21 08:43:55 +00:00
|
|
|
import i18n from '../../i18n';
|
2018-08-30 14:25:33 +00:00
|
|
|
|
2018-11-16 09:46:18 +00:00
|
|
|
import './Footer.css';
|
|
|
|
import './Select.css';
|
|
|
|
|
2018-08-30 14:25:33 +00:00
|
|
|
class Footer extends Component {
|
|
|
|
getYear = () => {
|
|
|
|
const today = new Date();
|
|
|
|
return today.getFullYear();
|
|
|
|
};
|
|
|
|
|
2018-11-09 06:51:28 +00:00
|
|
|
changeLanguage = (event) => {
|
|
|
|
i18n.changeLanguage(event.target.value);
|
2018-10-29 03:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-08-30 14:25:33 +00:00
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<footer className="footer">
|
|
|
|
<div className="container">
|
2018-11-16 09:46:18 +00:00
|
|
|
<div className="footer__row">
|
|
|
|
<div className="footer__column">
|
|
|
|
<div className="footer__copyright">
|
2019-02-19 08:04:43 +00:00
|
|
|
<Trans>copyright</Trans> © {this.getYear()} <a href="https://adguard.com/">AdGuard</a>
|
2018-10-12 13:27:59 +00:00
|
|
|
</div>
|
2018-08-30 14:25:33 +00:00
|
|
|
</div>
|
2018-11-16 09:46:18 +00:00
|
|
|
<div className="footer__column">
|
|
|
|
<a href={REPOSITORY.URL} className="footer__link" target="_blank" rel="noopener noreferrer">
|
|
|
|
<Trans>homepage</Trans>
|
2019-04-17 12:03:25 +00:00
|
|
|
</a>
|
|
|
|
<a href={PRIVACY_POLICY_LINK} className="footer__link" target="_blank" rel="noopener noreferrer">
|
|
|
|
<Trans>privacy_policy</Trans>
|
2018-11-16 09:46:18 +00:00
|
|
|
</a>
|
|
|
|
<a href={`${REPOSITORY.URL}/issues/new`} className="btn btn-outline-primary btn-sm footer__link footer__link--report" target="_blank" rel="noopener noreferrer">
|
|
|
|
<Trans>report_an_issue</Trans>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div className="footer__column footer__column--language">
|
|
|
|
<select className="form-control select select--language" value={i18n.language} onChange={this.changeLanguage}>
|
2018-11-21 08:43:55 +00:00
|
|
|
{LANGUAGES.map(language =>
|
|
|
|
<option key={language.key} value={language.key}>
|
2018-11-16 09:46:18 +00:00
|
|
|
{language.name}
|
2018-11-21 08:43:55 +00:00
|
|
|
</option>)}
|
2018-11-16 09:46:18 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
2018-08-30 14:25:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-29 03:26:19 +00:00
|
|
|
export default withNamespaces()(Footer);
|