aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/lifecycle_raised_button.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-20 13:44:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 22:30:25 +0800
commitcb11aec84df346d5180c7d5874859c1c34f0bf1c (patch)
treeb959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/website/ts/components/ui/lifecycle_raised_button.tsx
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
downloaddexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz
dexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst
dexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.zip
Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors
Diffstat (limited to 'packages/website/ts/components/ui/lifecycle_raised_button.tsx')
-rw-r--r--packages/website/ts/components/ui/lifecycle_raised_button.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
index 08e8bc9ce..852975ef6 100644
--- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx
+++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
@@ -35,8 +35,8 @@ export class LifeCycleRaisedButton extends
backgroundColor: colors.white,
labelColor: colors.darkGrey,
};
- private buttonTimeoutId: number;
- private didUnmount: boolean;
+ private _buttonTimeoutId: number;
+ private _didUnmount: boolean;
constructor(props: LifeCycleRaisedButtonProps) {
super(props);
this.state = {
@@ -44,8 +44,8 @@ export class LifeCycleRaisedButton extends
};
}
public componentWillUnmount() {
- clearTimeout(this.buttonTimeoutId);
- this.didUnmount = true;
+ clearTimeout(this._buttonTimeoutId);
+ this._didUnmount = true;
}
public render() {
if (this.props.isHidden) {
@@ -83,14 +83,14 @@ export class LifeCycleRaisedButton extends
buttonState: ButtonState.LOADING,
});
const didSucceed = await this.props.onClickAsyncFn();
- if (this.didUnmount) {
+ if (this._didUnmount) {
return; // noop since unmount called before async callback returned.
}
if (didSucceed) {
this.setState({
buttonState: ButtonState.COMPLETE,
});
- this.buttonTimeoutId = window.setTimeout(() => {
+ this._buttonTimeoutId = window.setTimeout(() => {
this.setState({
buttonState: ButtonState.READY,
});