feat: detect bee mode and enable/disable status checks accordingly (#318)
This commit is contained in:
@@ -10,7 +10,9 @@ import { Context } from '../../../providers/Bee'
|
||||
|
||||
const ChequebookDeployFund = (): ReactElement | null => {
|
||||
const { status, isLoading, chequebookAddress } = useContext(Context)
|
||||
const isOk = status.chequebook
|
||||
const { isOk, isEnabled } = status.chequebook
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
@@ -12,7 +12,9 @@ import { Context as SettingsContext } from '../../../providers/Settings'
|
||||
export default function NodeConnectionCheck(): ReactElement | null {
|
||||
const { status, isLoading } = useContext(Context)
|
||||
const { setDebugApiUrl, apiDebugUrl } = useContext(SettingsContext)
|
||||
const isOk = status.debugApiConnection
|
||||
const { isOk, isEnabled } = status.debugApiConnection
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
@@ -7,7 +7,9 @@ import { Context } from '../../../providers/Bee'
|
||||
|
||||
export default function EthereumConnectionCheck(): ReactElement | null {
|
||||
const { status, isLoading, nodeAddresses } = useContext(Context)
|
||||
const isOk = status.blockchainConnection
|
||||
const { isOk, isEnabled } = status.blockchainConnection
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
@@ -12,7 +12,9 @@ import { Context } from '../../../providers/Bee'
|
||||
export default function NodeConnectionCheck(): ReactElement | null {
|
||||
const { setApiUrl, apiUrl } = useContext(SettingsContext)
|
||||
const { status, isLoading } = useContext(Context)
|
||||
const isOk = status.apiConnection
|
||||
const { isEnabled, isOk } = status.apiConnection
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
@@ -7,7 +7,9 @@ import { Context } from '../../../providers/Bee'
|
||||
|
||||
export default function PeerConnection(): ReactElement | null {
|
||||
const { status, isLoading, topology } = useContext(Context)
|
||||
const isOk = status.topology
|
||||
const { isEnabled, isOk } = status.topology
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
@@ -8,7 +8,9 @@ import { Context } from '../../../providers/Bee'
|
||||
|
||||
export default function VersionCheck(): ReactElement | null {
|
||||
const { status, isLoading, latestUserVersion, latestPublishedVersion, latestBeeVersionUrl } = useContext(Context)
|
||||
const isOk = status.version
|
||||
const { isEnabled, isOk } = status.version
|
||||
|
||||
if (!isEnabled) return null
|
||||
|
||||
return (
|
||||
<ExpandableList
|
||||
|
||||
Reference in New Issue
Block a user