import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import { I18nContext } from '../../../contexts/i18n'; import ActionableMessage from '../../ui/actionable-message'; import Box from '../../ui/box'; import Typography from '../../ui/typography'; import { ALIGN_ITEMS, BLOCK_SIZES, COLORS, DISPLAY, FLEX_DIRECTION, TYPOGRAPHY, } from '../../../helpers/constants/design-system'; import Button from '../../ui/button'; import IconCaretLeft from '../../ui/icon/icon-caret-left'; const AddNetwork = ({ onBackClick, onAddNetworkClick, onAddNetworkManuallyClick, featuredRPCS, }) => { const t = useContext(I18nContext); const nets = featuredRPCS .sort((a, b) => (a.ticker > b.ticker ? 1 : -1)) .slice(0, 5); return ( {t('addNetwork')} {t('addFromAListOfPopularNetworks')} {t('customNetworks')} {nets.map((item, index) => ( {t('logo', {item.ticker} ))} {t('onlyInteractWith')} {t('endOfFlowMessage9')} } iconFillColor="#f8c000" useIcon withRightButton /> ); }; AddNetwork.propTypes = { onBackClick: PropTypes.func, onAddNetworkClick: PropTypes.func, onAddNetworkManuallyClick: PropTypes.func, featuredRPCS: PropTypes.array, }; export default AddNetwork;