remove the last of the localStorage for passing parameters

This commit is contained in:
2024-08-30 21:55:08 -06:00
parent b15476e379
commit 0947c55110
6 changed files with 14 additions and 38 deletions

View File

@@ -92,8 +92,8 @@ export default class ContactGiftingView extends Vue {
allContacts: Array<Contact> = [];
apiServer = "";
description = "";
projectId = localStorage.getItem("projectId") || "";
prompt = "What was given";
projectId = "";
prompt = "";
async created() {
try {
@@ -109,9 +109,9 @@ export default class ContactGiftingView extends Vue {
(a.name || "").localeCompare(b.name || ""),
);
this.prompt = (this.$route as Router).query["prompt"] ?? this.prompt;
this.projectId = (this.$route as Router).query["projectId"] || "";
localStorage.removeItem("projectId");
this.prompt = (this.$route as Router).query["prompt"] ?? this.prompt;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {