Trent Larson
2 years ago
2 changed files with 0 additions and 26 deletions
@ -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"); |
|||
}, |
|||
}, |
|||
}); |
Loading…
Reference in new issue