removed expense and income vs outflow and inflow

This commit is contained in:
2026-05-18 07:58:35 +05:30
parent 58271584ce
commit fff304ad1e
13 changed files with 48 additions and 53 deletions

View File

@@ -47,7 +47,7 @@ export function buildLatestItems(
reportData: ReportData,
selectedPeriodId: string | null,
selectedGroupKey: GroupKey | null,
mode: "expense" | "income"
flow: "outflows" | "inflows"
): LatestItem[] {
const txns = extractTransactions(reportData, selectedPeriodId, selectedGroupKey);

View File

@@ -5,7 +5,7 @@ import LatestItemsView from "./LatestItems.view";
type Props = {
reportData: ReportData;
mode: "expense" | "income";
flow: "outflows" | "inflows";
selectedPeriodId: string | null;
selectedGroupKey?: GroupKey | null;
accentColor: string;
@@ -14,7 +14,7 @@ type Props = {
export default function LatestItems({
reportData,
mode,
flow,
selectedPeriodId,
selectedGroupKey = null,
accentColor,
@@ -23,8 +23,8 @@ export default function LatestItems({
const [visibleCount, setVisibleCount] = React.useState(5);
const allItems = React.useMemo(() => {
return buildLatestItems(reportData, selectedPeriodId, selectedGroupKey, mode);
}, [reportData, selectedPeriodId, selectedGroupKey, mode]);
return buildLatestItems(reportData, selectedPeriodId, selectedGroupKey, flow);
}, [reportData, selectedPeriodId, selectedGroupKey, flow]);
const visibleItems = React.useMemo(() => {
return allItems.slice(0, visibleCount);