Browse Source

remove unused lastView and localStorage account names

kb/add-usage-guide
Trent Larson 2 years ago
parent
commit
315cdc0cf1
  1. 22
      src/store/account.ts
  2. 4
      src/store/app.ts

22
src/store/account.ts

@ -1,22 +0,0 @@
// @ts-check
import { defineStore } from "pinia";
export const useAccountStore = defineStore({
id: "account",
state: () => ({
account: JSON.parse(
typeof localStorage["account"] == "undefined"
? null
: localStorage["account"]
),
}),
getters: {
firstName: (state) => state.account.firstName,
lastName: (state) => state.account.lastName,
},
actions: {
reset() {
localStorage.removeItem("account");
},
},
});

4
src/store/app.ts

@ -4,10 +4,6 @@ import { defineStore } from "pinia";
export const useAppStore = defineStore({ export const useAppStore = defineStore({
id: "app", id: "app",
state: () => ({ state: () => ({
_lastView:
typeof localStorage["lastView"] == "undefined"
? "/start"
: localStorage["lastView"],
_projectId: _projectId:
typeof localStorage.getItem("projectId") === "undefined" typeof localStorage.getItem("projectId") === "undefined"
? "" ? ""

Loading…
Cancel
Save