Fix type errors in Index page
The BudgetTabContent and RecentTransactionsSection components in the Index page were receiving incorrect props, leading to TypeScript errors. This commit fixes these errors by passing the correct props to these components.
This commit is contained in:
@@ -7,14 +7,13 @@ import BudgetStatusDisplay from './budget/BudgetStatusDisplay';
|
||||
import BudgetInputButton from './budget/BudgetInputButton';
|
||||
import BudgetInputForm from './budget/BudgetInputForm';
|
||||
|
||||
interface BudgetData {
|
||||
targetAmount: number;
|
||||
spentAmount: number;
|
||||
remainingAmount: number;
|
||||
}
|
||||
|
||||
// 이 인터페이스는 이 컴포넌트가 받는 props를 명확히 정의합니다
|
||||
interface BudgetTabContentProps {
|
||||
data: BudgetData;
|
||||
data: {
|
||||
targetAmount: number;
|
||||
spentAmount: number;
|
||||
remainingAmount: number;
|
||||
};
|
||||
formatCurrency: (amount: number) => string;
|
||||
calculatePercentage: (spent: number, target: number) => number;
|
||||
onSaveBudget: (amount: number, categoryBudgets?: Record<string, number>) => void;
|
||||
|
||||
Reference in New Issue
Block a user