import { ReactElement, useContext } from 'react' import ExpandableList from '../../../components/ExpandableList' import ExpandableListItemNote from '../../../components/ExpandableListItemNote' import TopologyStats from '../../../components/TopologyStats' import StatusIcon from '../../../components/StatusIcon' import { Context } from '../../../providers/Bee' export default function PeerConnection(): ReactElement | null { const { status, isLoading, topology } = useContext(Context) const { isEnabled, isOk } = status.topology if (!isEnabled) return null return ( Connection to Peers } > {isOk ? 'You are connected to other Bee nodes' : 'Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file.'} ) }