fix all the lint warnings

This commit is contained in:
2023-09-04 15:17:32 -06:00
parent a5e0c847b1
commit 4b9cbd0e9f
10 changed files with 91 additions and 39 deletions

View File

@@ -220,6 +220,7 @@ import {
GiverInputInfo,
GiverOutputInfo,
GiveServerRecord,
ResultWithType,
} from "@/libs/endorserServer";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
@@ -547,22 +548,26 @@ export default class ProjectViewView extends Vue {
},
-1,
);
} else if (result.type == "error") {
console.log("Error with give result:", result);
if ("data" in result) {
const data: any = result.data;
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text:
data?.error?.message ||
"There was an error recording the give.",
},
-1,
} else {
console.log("Error with give creation:", result);
if (result.type != "error") {
console.log(
"... and it has an unexpected result type of",
(result as ResultWithType).type,
);
}
const message =
result?.error?.userMessage ||
"There was an error recording the Give.";
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text: message,
},
-1,
);
}
}
}