Skip to content

Commit

Permalink
Replace the custom component for reporting a bug from a toast
Browse files Browse the repository at this point in the history
ATM we are not able to import a custom component AND use cypress as our webpack 5 configuration is not completely supported by our Cypress preprocessor. The designed component will be included as soon as [#696](#696) is fixed
  • Loading branch information
tobias-wiese committed Nov 16, 2020
1 parent 2f37e1b commit cbc9a45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/use/helpers/Toasts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ReportBug from "@/components/common/ReportBug.vue";
//import ReportBug from "@/components/common/ReportBug.vue";
//import { markRaw } from "vue";
import { useToast } from "@/toast";
import { markRaw } from "vue";

const toast = useToast();

Expand All @@ -12,7 +12,8 @@ export function showAPIToast(code: number, msg?: string) {
switch (code) {
case 400:
case 500:
toast.error(markRaw(ReportBug));
//toast.error(markRaw(ReportBug));
toast.error("Something went wrong on our side. Please consider reporting this bug.");
break;
case 404:
toast.error("Could not find " + msg + ".");
Expand Down

0 comments on commit cbc9a45

Please sign in to comment.