import React from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; import { useSelector } from 'react-redux'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import { ADD_NETWORK_ROUTE, ADD_POPULAR_CUSTOM_NETWORK, } from '../../../../helpers/constants/routes'; import Button from '../../../../components/ui/button'; import { getIsCustomNetworkListEnabled } from '../../../../selectors'; const NetworksFormSubheader = ({ addNewNetwork }) => { const t = useI18nContext(); const history = useHistory(); const addPopularNetworkFeatureToggledOn = useSelector( getIsCustomNetworkListEnabled, ); return addNewNetwork ? (