Display # of connections

This commit is contained in:
Franck Royer 2021-07-01 16:48:56 +10:00
parent dc2c09bd41
commit 75297b9987
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 6 additions and 0 deletions

View File

@ -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>