Files
bee-dashboard/src/pages/peers/index.tsx
T
Vojtech Simetka 2624cf04c9 feat: bee provider caching the state of the app and refreshing periodically (#172)
* feat: bee provider caching the state of the app and refreshing periodically

* chore: added error handling
2021-08-18 11:10:12 +02:00

22 lines
562 B
TypeScript

import PeerTable from './PeerTable'
import TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'
import { Context } from '../../providers/Bee'
import TopologyStats from '../../components/TopologyStats'
import { ReactElement, useContext } from 'react'
export default function Peers(): ReactElement {
const { topology, peers, status } = useContext(Context)
if (!status.all) {
return <TroubleshootConnectionCard />
}
return (
<>
<TopologyStats topology={topology} />
<PeerTable peers={peers} />
</>
)
}