Skip to content

Commit b7d6771

Browse files
qriaxpdlf1004
authored andcommitted
Correct genesis time representation. Closes #50
1 parent 16b84b0 commit b7d6771

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/client/components/block/BlockList/BlockList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class BlockList extends React.Component<Props, State> {
6767
</Col>
6868
<Col md="9">
6969
<span className="timestamp float-right">
70-
{moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ")}
70+
{block.timestamp ? moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ") : 'Genesis'}
7171
</span>
7272
</Col>
7373
</Row>

src/client/components/home/LatestBlocks/LatestBlocks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const LatestBlocks = (props: Props) => {
4444
<CommaNumberString text={changeQuarkStringToCCC(block.miningReward)} />
4545
CCC
4646
</td>
47-
<td>{moment.unix(block.timestamp).fromNow()}</td>
47+
<td>{block.timestamp ? moment.unix(block.timestamp).fromNow() : 'Genesis'}</td>
4848
</tr>
4949
);
5050
})}

src/client/pages/Block/Block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Block extends React.Component<Props, State> {
8585
Block <span className="block-number">#{block.number}</span>
8686
</h1>
8787
<span className="timestamp">
88-
{moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ")}
88+
{block.timestamp ? moment.unix(block.timestamp).format("YYYY-MM-DD HH:mm:ssZ") : 'Genesis'}
8989
</span>
9090
</div>
9191
</Col>

src/client/pages/Blocks/Blocks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Blocks extends React.Component<Props, State> {
135135
/>
136136
CCC
137137
</td>
138-
<td>{moment.unix(block.timestamp).fromNow()}</td>
138+
<td>{block.timestamp ? moment.unix(block.timestamp).fromNow() : 'Genesis'}</td>
139139
</tr>
140140
);
141141
})}

0 commit comments

Comments
 (0)