Added a friendly message to the spying screen

This commit is contained in:
2019-06-05 16:00:30 +10:00
parent 4d0a446170
commit 793fc54903
4 changed files with 70 additions and 13 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ class Equipment extends React.Component {
super(props);
this.state = {
//
data: []
};
if (this.props.getFetch) {
@@ -17,7 +17,7 @@ class Equipment extends React.Component {
}
render() {
let display = this.flattenStructure(this.state, this.props.scientists);
let display = this.flattenStructure(this.state.data, this.props.scientists);
//if there are no scientists
if (this.props.scientists <= 0 && display.length === 0) {
@@ -77,7 +77,7 @@ class Equipment extends React.Component {
let json = JSON.parse(xhr.responseText);
//on success
this.setState(json);
this.setState({ data: json });
if (this.props.onSuccess) {
this.props.onSuccess(json);