Use vueuse useStorage instead of manually using localStorage

This commit is contained in:
2022-02-11 21:38:06 +00:00
parent 5868c3310e
commit 45389e01be
7 changed files with 27 additions and 60 deletions

View File

@ -1,3 +1,4 @@
import { useStorage } from "@vueuse/core";
import { defineStore } from "pinia";
import { useAPI } from "./api";
import { useAccountStore } from "./budget-account";
@ -8,7 +9,7 @@ interface State {
}
export const useBudgetsStore = defineStore('budget', {
state: (): State => ({
state: () => useStorage<State>('budget', {
CurrentBudgetID: null,
}),
getters: {