diff --git a/examples/eth-dm/src/App.tsx b/examples/eth-dm/src/App.tsx index 82ac3b7ff9..1d0de0594a 100644 --- a/examples/eth-dm/src/App.tsx +++ b/examples/eth-dm/src/App.tsx @@ -52,7 +52,13 @@ const useStyles = makeStyles({ flex: 1, margin: '10px', }, - wakuStatus: {}, + wakuStatus: { + marginRight: theme.spacing(2), + }, + title: { + flexGrow: 1, + }, + peers: {}, }); function App() { @@ -79,19 +85,24 @@ function App() { } }, [address, signer]); - let peers; + let peers = 0; if (waku) { peers = waku.libp2p.connectionManager.connections.size; } + let addressDisplay = ''; + if (address) { + addressDisplay = + address.substr(0, 6) + '...' + address.substr(address.length - 4, 4); + } + return (
- Ethereum Direct Message @@ -100,7 +111,13 @@ function App() { style={waku ? { color: green[500] } : {}} /> - {peers} + + {peers} peer{peers && peers > 1 ? 's' : ''} + + + Ethereum Direct Message + + {addressDisplay}