forked from jsnbuchanan/crowd-funder-for-time-pwa
remove separate storage reference for account check
This commit is contained in:
@@ -4,10 +4,6 @@ import { defineStore } from "pinia";
|
||||
export const useAppStore = defineStore({
|
||||
id: "app",
|
||||
state: () => ({
|
||||
_condition:
|
||||
typeof localStorage["condition"] == "undefined"
|
||||
? "uninitialized"
|
||||
: localStorage["condition"],
|
||||
_lastView:
|
||||
typeof localStorage["lastView"] == "undefined"
|
||||
? "/start"
|
||||
@@ -18,16 +14,9 @@ export const useAppStore = defineStore({
|
||||
: localStorage.getItem("projectId"),
|
||||
}),
|
||||
getters: {
|
||||
condition: (state) => state._condition,
|
||||
projectId: (state): string => state._projectId as string,
|
||||
},
|
||||
actions: {
|
||||
reset() {
|
||||
localStorage.removeItem("condition");
|
||||
},
|
||||
setCondition(newCondition: string) {
|
||||
localStorage.setItem("condition", newCondition);
|
||||
},
|
||||
async setProjectId(newProjectId: string) {
|
||||
localStorage.setItem("projectId", newProjectId);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user