removed expense and income vs outflow and inflow
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user