Reformatting

This commit is contained in:
maciejhirsz
2018-07-06 17:53:42 +02:00
parent 6fe1e47082
commit 538a30ccc3
20 changed files with 1005 additions and 1001 deletions
+21 -21
View File
@@ -4,29 +4,29 @@ import { Ago } from './Ago';
import { Types } from '@dotstats/common';
export namespace Node {
export interface Props {
id: Types.NodeId,
nodeDetails: Types.NodeDetails,
nodeStats: Types.NodeStats,
blockDetails: Types.BlockDetails,
}
export interface Props {
id: Types.NodeId,
nodeDetails: Types.NodeDetails,
nodeStats: Types.NodeStats,
blockDetails: Types.BlockDetails,
}
}
export function Node(props: Node.Props) {
const [name, implementation, version] = props.nodeDetails;
const [height, hash, blockTime, blockTimestamp] = props.blockDetails;
const [peers, txcount] = props.nodeStats;
const [name, implementation, version] = props.nodeDetails;
const [height, hash, blockTime, blockTimestamp] = props.blockDetails;
const [peers, txcount] = props.nodeStats;
return (
<tr>
<td>{name}</td>
<td>{implementation} v{version}</td>
<td>{peers}</td>
<td>{txcount}</td>
<td>#{formatNumber(height)}</td>
<td><span title={hash}>{trimHash(hash, 16)}</span></td>
<td>{(blockTime / 1000).toFixed(3)}s</td>
<td><Ago when={blockTimestamp} /></td>
</tr>
);
return (
<tr>
<td>{name}</td>
<td>{implementation} v{version}</td>
<td>{peers}</td>
<td>{txcount}</td>
<td>#{formatNumber(height)}</td>
<td><span title={hash}>{trimHash(hash, 16)}</span></td>
<td>{(blockTime / 1000).toFixed(3)}s</td>
<td><Ago when={blockTimestamp} /></td>
</tr>
);
}