aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-31 11:18:21 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-31 11:18:21 +0800
commit229f11f164ce5109b771295d9aee8ebb74314181 (patch)
treead4cdcc1926a1e7ec563f331c8f1edba7770b867 /packages/instant/src/components
parent0e1e9b27f6f5b93e1f9b0e2833bc600836f8e757 (diff)
downloaddexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar.gz
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar.bz2
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar.lz
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar.xz
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.tar.zst
dexon-sol-tools-229f11f164ce5109b771295d9aee8ebb74314181.zip
Nice formatting of displayed time
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r--packages/instant/src/components/simulated_progress_bar.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/instant/src/components/simulated_progress_bar.tsx b/packages/instant/src/components/simulated_progress_bar.tsx
index e9e547cbe..e4b08db8c 100644
--- a/packages/instant/src/components/simulated_progress_bar.tsx
+++ b/packages/instant/src/components/simulated_progress_bar.tsx
@@ -1,11 +1,9 @@
import * as _ from 'lodash';
import * as React from 'react';
-import { Dispatch } from 'redux';
import { PROGRESS_STALL_AT_PERCENTAGE, PROGRESS_TICK_INTERVAL_MS } from '../constants';
-import { Action, actions } from '../redux/actions';
-
import { ColorOption } from '../style/theme';
+import { timeUtil } from '../util/time';
import { Container } from './ui/container';
import { Flex } from './ui/flex';
@@ -106,9 +104,8 @@ export class SimulatedProgressBar extends React.Component<SimulatedProgressBarPr
<Container marginBottom="5px">
{/* TODO: consider moving to separate component */}
<Flex justify="space-between">
- {/* TODO: should do nice display of these (i.e. 'minutes' and 00:xx) */}
- <Text>Est. Time ({estimatedTimeSeconds} seconds)</Text>
- <Text>Time: {elapsedTimeSeconds}</Text>
+ <Text>Est. Time ({timeUtil.secondsToHumanDescription(estimatedTimeSeconds)})</Text>
+ <Text>Time: {timeUtil.secondsToStopwatchTime(elapsedTimeSeconds)}</Text>
</Flex>
</Container>
<Container width="100%" backgroundColor={ColorOption.lightGrey} borderRadius="6px">