Use vueuse useStorage instead of manually using localStorage
This commit is contained in:
@ -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: {
|
||||
|
Reference in New Issue
Block a user