import React from 'react'; import PropTypes from 'prop-types'; import { useDispatch } from 'react-redux'; import { Box, ButtonPrimary, Modal, ModalContent, ModalHeader, ModalOverlay, Text, } from '../../component-library'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { hideIpfsModal, setIpfsGateway } from '../../../store/actions'; import { IPFS_DEFAULT_GATEWAY_URL } from '../../../../shared/constants/network'; import { Size, TextColor, TextVariant, } from '../../../helpers/constants/design-system'; export const ToggleIpfsModal = ({ onClose }) => { const t = useI18nContext(); const dispatch = useDispatch(); return ( {t('showNft')} {t('ipfsToggleModalDescriptionOne')} {t('ipfsToggleModalDescriptionTwo', [ {t('ipfsToggleModalSettings')}, , ])} { dispatch(setIpfsGateway(IPFS_DEFAULT_GATEWAY_URL)); dispatch(hideIpfsModal()); }} size={Size.LG} > {t('confirm')} ); }; ToggleIpfsModal.propTypes = { onClose: PropTypes.func.isRequired, };