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