mirror of https://github.com/status-im/js-waku.git
Display # of connections
This commit is contained in:
parent
dc2c09bd41
commit
75297b9987
|
@ -83,6 +83,11 @@ function App() {
|
||||||
.then((address) => setAddress(address));
|
.then((address) => setAddress(address));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let peers;
|
||||||
|
if (waku) {
|
||||||
|
peers = waku.libp2p.connectionManager.connections.size;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
|
@ -99,6 +104,7 @@ function App() {
|
||||||
style={waku ? { color: green[500] } : {}}
|
style={waku ? { color: green[500] } : {}}
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
<Typography>{peers}</Typography>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue