diff --git a/client/app/scripts/components/loading.js b/client/app/scripts/components/loading.js index afd21b940..2696f46b1 100644 --- a/client/app/scripts/components/loading.js +++ b/client/app/scripts/components/loading.js @@ -14,7 +14,6 @@ const LOADING_TEMPLATES = [ 'Locating THINGS', 'Optimizing THINGS', 'Transporting THINGS', - 'Double checking THINGS', ]; diff --git a/client/app/scripts/components/nodes.js b/client/app/scripts/components/nodes.js index 92db420dd..38ae981c2 100644 --- a/client/app/scripts/components/nodes.js +++ b/client/app/scripts/components/nodes.js @@ -73,7 +73,7 @@ class Nodes extends React.Component { return (
- + this.setState({ show: true }), this.props.delay); - } - - cancelShow() { - clearTimeout(this.showTimeout); + componentWillUnmount() { + this.cancelShow(); } componentWillReceiveProps(nextProps) { @@ -34,6 +32,14 @@ export class DelayedShow extends React.Component { } } + scheduleShow() { + this.showTimeout = setTimeout(() => this.setState({ show: true }), this.props.delay); + } + + cancelShow() { + clearTimeout(this.showTimeout); + } + render() { const { children } = this.props; const { show } = this.state;