import React from 'react'; import { useTranslation } from 'react-i18next'; import classNames from 'classnames'; import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants'; import { LANGUAGES } from '../../helpers/twosky'; import i18n from '../../i18n'; import Version from './Version'; import './Footer.css'; import './Select.css'; import { setHtmlLangAttr } from '../../helpers/helpers'; const linksData = [ { href: REPOSITORY.URL, name: 'homepage', }, { href: PRIVACY_POLICY_LINK, name: 'privacy_policy', }, { href: REPOSITORY.ISSUES, className: 'btn btn-outline-primary btn-sm footer__link--report', name: 'report_an_issue', }, ]; const Footer = () => { const { t } = useTranslation(); const getYear = () => { const today = new Date(); return today.getFullYear(); }; const changeLanguage = (event) => { const { value } = event.target; i18n.changeLanguage(value); setHtmlLangAttr(value); }; const renderCopyright = () =>
{t('copyright')} © {getYear()}{' '} AdGuard
; const renderLinks = (linksData) => linksData.map(({ name, href, className = '' }) => {t(name)} ); return ( <>
{renderCopyright()}
); }; export default Footer;