d6d03bf7c6
* feat: changing API urls does not need the app refresh * fix: propagate beeDebugApi and beeApi change to the refresh interval * fix: any failed request on the Bee provider does not stop the execution of other requests * fix: error handling for incorrect bee and bee debug urls * fix: change debug API in the settings tab
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import { ReactElement, useContext } from 'react'
|
|
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'
|
|
|
|
import NodeSetupWorkflow from './NodeSetupWorkflow'
|
|
import StatusCard from './StatusCard'
|
|
import EthereumAddressCard from '../../components/EthereumAddressCard'
|
|
import { Context as BeeContext } from '../../providers/Bee'
|
|
|
|
const useStyles = makeStyles((theme: Theme) =>
|
|
createStyles({
|
|
root: {
|
|
width: '100%',
|
|
display: 'grid',
|
|
rowGap: theme.spacing(3),
|
|
},
|
|
}),
|
|
)
|
|
|
|
export default function Status(): ReactElement {
|
|
const classes = useStyles()
|
|
|
|
const {
|
|
status,
|
|
latestUserVersion,
|
|
isLatestBeeVersion,
|
|
latestBeeVersionUrl,
|
|
topology,
|
|
nodeAddresses,
|
|
chequebookAddress,
|
|
} = useContext(BeeContext)
|
|
|
|
return (
|
|
<div className={classes.root}>
|
|
<StatusCard
|
|
userBeeVersion={latestUserVersion}
|
|
isLatestBeeVersion={isLatestBeeVersion}
|
|
isOk={status.all}
|
|
nodeTopology={topology}
|
|
latestUrl={latestBeeVersionUrl}
|
|
nodeAddresses={nodeAddresses}
|
|
/>
|
|
{nodeAddresses && chequebookAddress && (
|
|
<EthereumAddressCard nodeAddresses={nodeAddresses} chequebookAddress={chequebookAddress} />
|
|
)}
|
|
<NodeSetupWorkflow />
|
|
</div>
|
|
)
|
|
}
|