forked from trent_larson/crowd-funder-for-time-pwa
add error message to stats page
This commit is contained in:
@@ -32,7 +32,7 @@ function createLight() {
|
||||
}
|
||||
|
||||
class World {
|
||||
constructor(container) {
|
||||
constructor(container, vue) {
|
||||
this.update = this.update.bind(this);
|
||||
|
||||
// Instances of camera, scene, and renderer
|
||||
@@ -72,7 +72,7 @@ class World {
|
||||
|
||||
this.scene.add(light, terrain);
|
||||
|
||||
this.loadClaims();
|
||||
this.loadClaims(vue);
|
||||
|
||||
requestAnimationFrame(this.update);
|
||||
|
||||
@@ -95,7 +95,7 @@ class World {
|
||||
requestAnimationFrame(this.update);
|
||||
}
|
||||
|
||||
async loadClaims() {
|
||||
async loadClaims(vue) {
|
||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
||||
try {
|
||||
const url =
|
||||
@@ -191,21 +191,21 @@ class World {
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
"Got bad response status & data of",
|
||||
"Got bad server response status & data of",
|
||||
resp.status,
|
||||
resp.data
|
||||
);
|
||||
// this.alertTitle = "Error With Server";
|
||||
// this.alertMessage =
|
||||
// "Got an error retrieving your given time from the server.";
|
||||
// this.isAlertVisible = true;
|
||||
vue.setAlert(
|
||||
"Error With Server",
|
||||
"There was an error retrieving your claims from the server."
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Got error of", error);
|
||||
// this.alertTitle = "Error With Server";
|
||||
// this.alertMessage =
|
||||
// "Got an error retrieving your given time from the server.";
|
||||
// this.isAlertVisible = true;
|
||||
console.log("Got exception contacting server:", error);
|
||||
vue.setAlert(
|
||||
"Error With Server",
|
||||
"There was a problem retrieving your claims from the server."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user