fix(FE): add depedency to useMemo rows data

This commit is contained in:
randy-ar
2026-01-16 21:55:39 +07:00
parent 79cb89b9a0
commit f371d06386
@@ -44,7 +44,7 @@ const ClosingFinanceTable = ({
return [customItems, ...purchases, totalBudgeting, ...overheads];
}
return [];
}, []);
}, [finance]);
const profitLossTableData: ProfitLossItem[] = useMemo(() => {
if (isResponseSuccess(finance)) {
@@ -78,7 +78,7 @@ const ClosingFinanceTable = ({
return [...incomes, ...purchases, grossProfit, ...overheads, subtotal];
}
return [];
}, []);
}, [finance]);
return (
<div className='flex flex-col gap-4'>