Browse Source

remove unused lastView and localStorage account names

tweaks
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({
id: "app",
state: () => ({
_lastView:
typeof localStorage["lastView"] == "undefined"
? "/start"
: localStorage["lastView"],
_projectId:
typeof localStorage.getItem("projectId") === "undefined"
? ""

Loading…
Cancel
Save