Skip to content

Commit

Permalink
NodeInfo: hide alias and block height fields when not available
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Mar 24, 2024
1 parent b1035b7 commit 2e4d7cf
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions views/NodeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export default class NodeInfo extends React.Component<NodeInfoProps, {}> {

const NodeInfoView = () => (
<React.Fragment>
<KeyValue
keyValue={localeString('views.NodeInfo.alias')}
value={nodeInfo.alias}
sensitive
/>
{nodeInfo.alias && (
<KeyValue
keyValue={localeString('views.NodeInfo.alias')}
value={nodeInfo.alias}
sensitive
/>
)}

{nodeInfo.nodeId && (
<KeyValue
Expand Down Expand Up @@ -119,10 +121,12 @@ export default class NodeInfo extends React.Component<NodeInfoProps, {}> {
/>
)}

<KeyValue
keyValue={localeString('views.NodeInfo.blockHeight')}
value={nodeInfo.currentBlockHeight}
/>
{nodeInfo.currentBlockHeight && (
<KeyValue
keyValue={localeString('views.NodeInfo.blockHeight')}
value={nodeInfo.currentBlockHeight}
/>
)}

{nodeInfo.block_hash && (
<KeyValue
Expand Down

0 comments on commit 2e4d7cf

Please sign in to comment.