import { ReactElement, useContext } from 'react' import CodeBlockTabs from '../../../components/CodeBlockTabs' import ExpandableList from '../../../components/ExpandableList' import ExpandableListItem from '../../../components/ExpandableListItem' import ExpandableListItemNote from '../../../components/ExpandableListItemNote' import StatusIcon from '../../../components/StatusIcon' import { CheckState, Context } from '../../../providers/Bee' export default function VersionCheck(): ReactElement | null { const { status, isLoading, latestUserVersion, latestPublishedVersion, latestBeeVersionUrl } = useContext(Context) const { isEnabled, checkState } = status.version if (!isEnabled) return null return ( Bee Version } > {checkState === CheckState.OK ? ( 'You are running the latest version of Bee.' ) : ( <> Your Bee version is out of date. Please update to the{' '} latest {' '} before continuing. Rerun the installation script below to upgrade. For more information please see the{' '} Docs . )} ) }