diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 00:51:27 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 00:51:27 +0800 |
commit | f9a38fcb32ee4e755c7f271a1c5a116c29985a10 (patch) | |
tree | 6d84100fe1b8139b832ff286c4bbd5669e18df1b /packages/instant | |
parent | 906909e33fe97d49196696c528c131c1a1c66f14 (diff) | |
download | dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar.gz dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar.bz2 dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar.lz dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar.xz dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.tar.zst dexon-sol-tools-f9a38fcb32ee4e755c7f271a1c5a116c29985a10.zip |
ended -> hasEnded
Diffstat (limited to 'packages/instant')
-rw-r--r-- | packages/instant/src/components/time_counter.tsx | 6 | ||||
-rw-r--r-- | packages/instant/src/components/timed_progress_bar.tsx | 6 | ||||
-rw-r--r-- | packages/instant/src/containers/selected_asset_progress.tsx | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/packages/instant/src/components/time_counter.tsx b/packages/instant/src/components/time_counter.tsx index 26deb82bd..7d9245b5d 100644 --- a/packages/instant/src/components/time_counter.tsx +++ b/packages/instant/src/components/time_counter.tsx @@ -7,7 +7,7 @@ import { Text } from './ui/text'; export interface TimeCounterProps { estimatedTimeMs: number; - ended: boolean; + hasEnded: boolean; } interface TimeCounterState { elapsedSeconds: number; @@ -28,7 +28,7 @@ export class TimeCounter extends React.Component<TimeCounterProps, TimeCounterSt } public componentDidUpdate(prevProps: TimeCounterProps): void { - if (prevProps.ended !== this.props.ended) { + if (prevProps.hasEnded !== this.props.hasEnded) { this._setupTimerBasedOnProps(); } } @@ -44,7 +44,7 @@ export class TimeCounter extends React.Component<TimeCounterProps, TimeCounterSt } private _setupTimerBasedOnProps(): void { - this.props.ended ? this._clearTimer() : this._newTimer(); + this.props.hasEnded ? this._clearTimer() : this._newTimer(); } private _newTimer(): void { diff --git a/packages/instant/src/components/timed_progress_bar.tsx b/packages/instant/src/components/timed_progress_bar.tsx index a4bb2eabd..16781b9d7 100644 --- a/packages/instant/src/components/timed_progress_bar.tsx +++ b/packages/instant/src/components/timed_progress_bar.tsx @@ -8,7 +8,7 @@ import { Container } from './ui/container'; export interface TimedProgressBarProps { expectedTimeMs: number; - ended: boolean; + hasEnded: boolean; } interface TimedProgressBarState { @@ -39,7 +39,7 @@ export class TimedProgressBar extends React.Component<TimedProgressBarProps, Tim } public componentDidUpdate(prevProps: TimedProgressBarProps, prevState: TimedProgressBarState): void { - if (prevProps.ended === false && this.props.ended === true) { + if (prevProps.hasEnded === false && this.props.hasEnded === true) { // Show nice animation going to end // barRef current should always exist, but checking for typesafety if (this._barRef.current) { @@ -53,7 +53,7 @@ export class TimedProgressBar extends React.Component<TimedProgressBarProps, Tim return; } - if (prevProps.expectedTimeMs !== this.props.expectedTimeMs || prevProps.ended !== this.props.ended) { + if (prevProps.expectedTimeMs !== this.props.expectedTimeMs || prevProps.hasEnded !== this.props.hasEnded) { // things changed, get fresh state this.setState(beginningState(this.props)); } diff --git a/packages/instant/src/containers/selected_asset_progress.tsx b/packages/instant/src/containers/selected_asset_progress.tsx index afbb45dac..a910d8031 100644 --- a/packages/instant/src/containers/selected_asset_progress.tsx +++ b/packages/instant/src/containers/selected_asset_progress.tsx @@ -24,14 +24,14 @@ export const SelectedAssetSimulatedProgressComponent: React.StatelessComponent< buyOrderState.processState === OrderProcessState.FAILURE ) { const progress = buyOrderState.progress; - const ended = buyOrderState.processState !== OrderProcessState.PROCESSING; + const hasEnded = buyOrderState.processState !== OrderProcessState.PROCESSING; const expectedTimeMs = progress.expectedEndTimeUnix - progress.startTimeUnix; return ( <Container padding="20px 20px 0px 20px" width="100%"> <Container marginBottom="5px"> - <TimeCounter estimatedTimeMs={expectedTimeMs} ended={ended} key={progress.startTimeUnix} /> + <TimeCounter estimatedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} /> </Container> - <TimedProgressBar expectedTimeMs={expectedTimeMs} ended={ended} key={progress.startTimeUnix} /> + <TimedProgressBar expectedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} /> </Container> ); } |