forked from jsnbuchanan/crowd-funder-for-time-pwa
Adding new routing logic ... broken for the moment
This commit is contained in:
@@ -2,12 +2,17 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useAppStore = defineStore({
|
||||
id: "account",
|
||||
id: "app",
|
||||
state: () => ({
|
||||
condition: JSON.parse(
|
||||
typeof localStorage["app_condition"] == "undefined"
|
||||
typeof localStorage["condition"] == "undefined"
|
||||
? "uninitialized"
|
||||
: localStorage["app_condition"]
|
||||
: localStorage["condition"]
|
||||
),
|
||||
lastView: JSON.parse(
|
||||
typeof localStorage["lastView"] == "undefined"
|
||||
? "/start"
|
||||
: localStorage["lastView"]
|
||||
),
|
||||
}),
|
||||
getters: {
|
||||
@@ -15,7 +20,7 @@ export const useAppStore = defineStore({
|
||||
},
|
||||
actions: {
|
||||
reset() {
|
||||
localStorage.removeItem("app_condition");
|
||||
localStorage.removeItem("condition");
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user