diff --git a/frontend/squeak-node-frontend/src/pages/lightning/Lightning.js b/frontend/squeak-node-frontend/src/pages/lightning/Lightning.js index da898f89..9da20189 100644 --- a/frontend/squeak-node-frontend/src/pages/lightning/Lightning.js +++ b/frontend/squeak-node-frontend/src/pages/lightning/Lightning.js @@ -83,7 +83,7 @@ export default function LightningPage() { getWalletBalance() },[]); - function NoInfoContent() { + function NoBalanceContent() { return (
Unable to fetch lightning info. @@ -108,81 +108,125 @@ export default function LightningPage() { ) } - function InfoContent() { + function BalanceContent() { return ( <> - {PubkeyGridItem()} - - - {StatusGridItem()} - {ChannelsGridItem()} {BalanceGridItem()} ) } - function PubkeyGridItem() { + function NodeInfoContent() { + return ( + <> + + {StatusGridItem()} + + + ) + } + + function BalanceGridItem() { return ( - -
- - pubkey - - - {lndInfo.getIdentityPubkey()} - -
-
+ +
+ + {walletBalance.getTotalBalance()} satoshis + +
+ + + + unconfirmed balance (satoshis) + + {walletBalance.getUnconfirmedBalance()} + + + + + + confirmed balance (satoshis): + + {walletBalance.getConfirmedBalance()} + + +
) } function StatusGridItem() { return ( - - - - - - synced to chain - - {lndInfo.getSyncedToChain().toString()} - - - - synced to graph - - {lndInfo.getSyncedToGraph().toString()} - - - - block height - - {lndInfo.getBlockHeight()} - - - + + + + + + node pubkey + + {lndInfo.getIdentityPubkey()} + + + + + + synced to chain + + {lndInfo.getSyncedToChain().toString()} + + + + + + synced to graph + + {lndInfo.getSyncedToGraph().toString()} + + + + + + block height + + {lndInfo.getBlockHeight()} + + + + ) } @@ -226,46 +270,6 @@ export default function LightningPage() { ) } - function BalanceGridItem() { - return ( - - - - - - total balance - - {walletBalance.getTotalBalance()} - - - - confirmed balance - - {walletBalance.getConfirmedBalance()} - - - - unconfirmed balance - - {walletBalance.getUnconfirmedBalance()} - - - - - ) - } - function TabPanel(props) { const { children, value, index, ...other } = props; @@ -295,12 +299,15 @@ export default function LightningPage() { {(lndInfo && walletBalance) - ? InfoContent() - : NoInfoContent() + ? BalanceContent() + : NoBalanceContent() } - foooo + {(lndInfo && walletBalance) + ? NodeInfoContent() + : NoBalanceContent() + } )