20260628215623
This commit is contained in:
1 parent
51622a4b1a
commit
e687846eb4
68 files changed
+2234
-1591
No files matched your search
@@ -1,9 +1,5 @@
|
||||
import { create } from "zustand";
|
||||
import {
|
||||
loadDataApi,
|
||||
saveDataApi,
|
||||
getUniqueIdApi,
|
||||
} from "@/request/api";
|
||||
import { loadDataApi, saveDataApi, getUniqueIdApi } from "@/request/api";
|
||||
import { useUserStore } from "./user";
|
||||
|
||||
interface FavoriteState {
|
||||
|
||||
@@ -21,8 +21,10 @@ export const useFinanceStore = create<FinanceState>((set, get) => ({
|
||||
clearCategories: () => set({ categories: [] }),
|
||||
|
||||
getCategories: () => get().categories,
|
||||
getExpenseCategories: () => get().categories.filter((category) => category.type === FinanceType.Expense),
|
||||
getIncomeCategories: () => get().categories.filter((category) => category.type === FinanceType.Income),
|
||||
getExpenseCategories: () =>
|
||||
get().categories.filter((category) => category.type === FinanceType.Expense),
|
||||
getIncomeCategories: () =>
|
||||
get().categories.filter((category) => category.type === FinanceType.Income),
|
||||
loadCategories: async (familyId: number) => {
|
||||
if (!familyId) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user