diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-11 23:38:51 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-14 16:35:13 +0800 |
commit | b74957acdfc8d67d154bcb4698acd7575db7cc47 (patch) | |
tree | 3f33c2faac3b55e52098ab0b5b9883a9b62f5aee /packages/website/ts/components/inputs/expiration_input.tsx | |
parent | 6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff) | |
download | dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.gz dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.zst dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.zip |
Add missing type definitions
Diffstat (limited to 'packages/website/ts/components/inputs/expiration_input.tsx')
-rw-r--r-- | packages/website/ts/components/inputs/expiration_input.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/components/inputs/expiration_input.tsx b/packages/website/ts/components/inputs/expiration_input.tsx index e473648d2..5c68080fe 100644 --- a/packages/website/ts/components/inputs/expiration_input.tsx +++ b/packages/website/ts/components/inputs/expiration_input.tsx @@ -30,7 +30,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir timeMoment: didUserSetExpiry ? expirationMoment : undefined, }; } - public render() { + public render(): React.ReactNode { const date = this.state.dateMoment ? this.state.dateMoment.toDate() : undefined; const time = this.state.timeMoment ? this.state.timeMoment.toDate() : undefined; return ( @@ -72,7 +72,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir .startOf('day') .isBefore(this._earliestPickableMoment); } - private _clearDates() { + private _clearDates(): void { this.setState({ dateMoment: undefined, timeMoment: undefined, @@ -80,7 +80,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir const defaultDateTime = utils.initialOrderExpiryUnixTimestampSec(); this.props.updateOrderExpiry(defaultDateTime); } - private _onDateChanged(e: any, date: Date) { + private _onDateChanged(e: any, date: Date): void { const dateMoment = moment(date); this.setState({ dateMoment, @@ -88,7 +88,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir const timestamp = utils.convertToUnixTimestampSeconds(dateMoment, this.state.timeMoment); this.props.updateOrderExpiry(timestamp); } - private _onTimeChanged(e: any, time: Date) { + private _onTimeChanged(e: any, time: Date): void { const timeMoment = moment(time); this.setState({ timeMoment, |