diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 02:15:34 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 02:15:34 +0800 |
commit | cd79a2fad1babd1d421c693208cd7de5ae980630 (patch) | |
tree | eedd29933a0a41233ed8088b977b1da485098d91 /packages/instant/src/components/time_counter.tsx | |
parent | f82d16a5b06a47f3ede917165ba75dfd73f48137 (diff) | |
download | dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar.gz dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar.bz2 dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar.lz dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar.xz dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.tar.zst dexon-0x-contracts-cd79a2fad1babd1d421c693208cd7de5ae980630.zip |
Use new constants
Diffstat (limited to 'packages/instant/src/components/time_counter.tsx')
-rw-r--r-- | packages/instant/src/components/time_counter.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/components/time_counter.tsx b/packages/instant/src/components/time_counter.tsx index 7d9245b5d..c98fd2550 100644 --- a/packages/instant/src/components/time_counter.tsx +++ b/packages/instant/src/components/time_counter.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; +import { ONE_SECOND_MS } from '../constants'; import { timeUtil } from '../util/time'; import { Flex } from './ui/flex'; @@ -34,7 +35,7 @@ export class TimeCounter extends React.Component<TimeCounterProps, TimeCounterSt } public render(): React.ReactNode { - const estimatedTimeSeconds = this.props.estimatedTimeMs / 1000; + const estimatedTimeSeconds = this.props.estimatedTimeMs / ONE_SECOND_MS; return ( <Flex justify="space-between"> <Text>Est. Time ({timeUtil.secondsToHumanDescription(estimatedTimeSeconds)})</Text> @@ -53,7 +54,7 @@ export class TimeCounter extends React.Component<TimeCounterProps, TimeCounterSt this.setState({ elapsedSeconds: this.state.elapsedSeconds + 1, }); - }, 1000); + }, ONE_SECOND_MS); } private _clearTimer(): void { |