fix flow usage for continousFetch
This commit is contained in:
parent
d4b4b78e10
commit
6f4e35ac90
1 changed files with 6 additions and 6 deletions
|
@ -24,9 +24,10 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
class ActiveShapeShift extends React.PureComponent<Props> {
|
class ActiveShapeShift extends React.PureComponent<Props> {
|
||||||
|
continousFetch: ?number;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
// $FlowFixMe
|
|
||||||
this.continousFetch = undefined;
|
this.continousFetch = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +35,6 @@ class ActiveShapeShift extends React.PureComponent<Props> {
|
||||||
const { getActiveShift, shiftDepositAddress } = this.props;
|
const { getActiveShift, shiftDepositAddress } = this.props;
|
||||||
|
|
||||||
getActiveShift(shiftDepositAddress);
|
getActiveShift(shiftDepositAddress);
|
||||||
// $FlowFixMe
|
|
||||||
this.continousFetch = setInterval(() => {
|
this.continousFetch = setInterval(() => {
|
||||||
getActiveShift(shiftDepositAddress);
|
getActiveShift(shiftDepositAddress);
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
@ -52,10 +52,10 @@ class ActiveShapeShift extends React.PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
clearContinuousFetch() {
|
clearContinuousFetch() {
|
||||||
/// $FlowFixMe
|
if (this.continousFetch) {
|
||||||
clearInterval(this.continousFetch);
|
clearInterval(this.continousFetch);
|
||||||
// $FlowFixMe
|
this.continousFetch = null;
|
||||||
this.continousFetch = null;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue