import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import AppPage from '../common/app-page' import AppText from '../common/app-text' import AppLink from '../common/AppLink' import Segment from '../common/segment' const License = ({ children }) => { const { t } = useTranslation(null, { keyPrefix: 'settings.license' }) const currentYear = new Date().getFullYear() const link = 'https://www.gnu.org/licenses/gpl-3.0.html' return ( {t('text', { currentYear })} {link} {children} ) } License.propTypes = { children: PropTypes.node, } export default License