20260628215623

This commit is contained in:
oneao committed 2026-06-28 21:56:23 +08:00
1 parent 51622a4b1a
commit e687846eb4
68 files changed
+2234 -1591

No files matched your search

+1 -5
View File
@@ -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 {
+4 -2
View File
@@ -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;