diff --git a/package-lock.json b/package-lock.json index 85346bc..21d728f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5707,7 +5707,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5725,11 +5726,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5742,15 +5745,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5853,7 +5859,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5863,6 +5870,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5875,17 +5883,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5902,6 +5913,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5974,7 +5986,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5984,6 +5997,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6059,7 +6073,8 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6089,6 +6104,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6106,6 +6122,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6144,11 +6161,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true } } }, diff --git a/src/pages/Home.js b/src/pages/Home.js index f5c788f..ef09a2e 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -15,9 +15,7 @@ class Home extends Component { constructor(props) { super(props) - this.state = { - totalSuppressed: 0, - } + this.state = { totalSuppressed: 0, totalBoatSuppressed: 0, fetchedContent: false } } componentWillMount() { @@ -68,8 +66,13 @@ class Home extends Component { } } - if( !missing && !this.state.totalSuppressed && !missingBoat && !this.state.totalBoatSuppressed){ - this.setState({...this.state, totalSuppressed: total, totalBoatSuppressed: totalBoat}) + if (!this.state.fetchedContent && !missing && !this.state.totalSuppressed && !missingBoat && !this.state.totalBoatSuppressed) { + this.setState({ + ...this.state, + totalSuppressed: total, + totalBoatSuppressed: totalBoat, + fetchedContent: true, + }) } } @@ -117,7 +120,6 @@ class Home extends Component { handleBoatLines() { let allBoatLines = [] for (let location of LocBoat.locations) { - console.log(this.props) if (this.props.allBoatSuppressedContent[`fetchedLastBoatSuppressedIn${location.key}`]) { allBoatLines = [...allBoatLines, this.renderLine(location, this.props.allBoatSuppressedContent[`fetchedLastBoatSuppressedIn${location.key}`], true)] }