import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; const DuplicatedAlert = (props) => { const { t } = props; const urlParams = new URLSearchParams(window.location.search); const fromPath = urlParams.get('duplicated'); return (
{ t('Duplicated') }: {t('page_page.notice.duplicated')} {fromPath} {t('page_page.notice.duplicated_period')}
); }; DuplicatedAlert.propTypes = { t: PropTypes.func.isRequired, // i18next }; export default withTranslation()(DuplicatedAlert);