import React, { useContext } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import { I18nContext } from '../../../contexts/i18n' import PageContainerFooter from '../../../components/ui/page-container/page-container-footer' export default function SwapsFooter ({ onCancel, hideCancel, onSubmit, submitText, disabled, showTermsOfService, showTopBorder, }) { const t = useContext(I18nContext) return (
{showTermsOfService && (
global.platform.openTab({ url: 'https://metamask.io/terms.html' })} > {t('termsOfService')}
)}
) } SwapsFooter.propTypes = { onCancel: PropTypes.func, hideCancel: PropTypes.bool, onSubmit: PropTypes.func.isRequired, submitText: PropTypes.string, disabled: PropTypes.bool, showTermsOfService: PropTypes.bool, showTopBorder: PropTypes.bool, }