import { ReactElement, useContext } from 'react' import CodeBlockTabs from '../../../components/CodeBlockTabs' import { Context as SettingsContext } from '../../../providers/Settings' import ExpandableList from '../../../components/ExpandableList' import ExpandableListItem from '../../../components/ExpandableListItem' import ExpandableListItemNote from '../../../components/ExpandableListItemNote' import ExpandableListItemInput from '../../../components/ExpandableListItemInput' import StatusIcon from '../../../components/StatusIcon' import { CheckState, Context } from '../../../providers/Bee' export default function NodeConnectionCheck(): ReactElement | null { const { setApiUrl, apiUrl } = useContext(SettingsContext) const { status, isLoading } = useContext(Context) const { isEnabled, checkState } = status.apiConnection if (!isEnabled) return null return ( Connection to Bee API } > {checkState === CheckState.OK ? 'The connection to the Bee nodes API has been successful' : 'Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it.'} {checkState === CheckState.ERROR && (
  • Check the status of your node by running the below command to see if your node is running.
  • If your node is running, check your firewall settings to make sure that port 1633 (or your custom specified port) is exposed to the internet. If your node is not running try executing the below command to start your bee node
  • Run the commands to validate your node is running and see the log output.
  • } />
    )}
    ) }