Skip to content

Commit

Permalink
Correct genesis time representation. Closes CodeChain-io#50
Browse files Browse the repository at this point in the history
  • Loading branch information
qria committed Sep 12, 2018
1 parent 16b84b0 commit 26a651d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/client/components/block/BlockList/BlockList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class BlockList extends React.Component<Props, State> {
</Col>
<Col md="9">
<span className="timestamp float-right">
{moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ")}
{block.timestamp ? moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ") : 'Genesis'}
</span>
</Col>
</Row>
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/home/LatestBlocks/LatestBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const LatestBlocks = (props: Props) => {
<CommaNumberString text={changeQuarkStringToCCC(block.miningReward)} />
CCC
</td>
<td>{moment.unix(block.timestamp).fromNow()}</td>
<td>{block.timestamp ? moment.unix(block.timestamp).fromNow() : 'Genesis'}</td>
</tr>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion src/client/pages/Block/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Block extends React.Component<Props, State> {
Block <span className="block-number">#{block.number}</span>
</h1>
<span className="timestamp">
{moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ")}
{block.timestamp ? moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ") : 'Genesis'}
</span>
</div>
</Col>
Expand Down
2 changes: 1 addition & 1 deletion src/client/pages/Blocks/Blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class Blocks extends React.Component<Props, State> {
/>
CCC
</td>
<td>{moment.unix(block.timestamp).fromNow()}</td>
<td>{block.timestamp ? moment.unix(block.timestamp).fromNow() : 'Genesis'}</td>
</tr>
);
})}
Expand Down

0 comments on commit 26a651d

Please sign in to comment.