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:
@@ -30,11 +30,18 @@ const Index = () => {
|
||||
</TabsList>
|
||||
|
||||
<TabsContent value="budget" className="focus-visible:outline-none">
|
||||
<BudgetTabContent budgetData={budgetData.monthly} />
|
||||
<BudgetTabContent
|
||||
data={budgetData.monthly}
|
||||
formatCurrency={(amount) => `${amount.toLocaleString()}원`}
|
||||
calculatePercentage={(spent, target) => (target > 0 ? (spent / target) * 100 : 0)}
|
||||
onSaveBudget={(amount, categoryBudgets) => {
|
||||
/* 예산 저장 로직 */
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="recent" className="focus-visible:outline-none">
|
||||
<RecentTransactionsSection />
|
||||
<RecentTransactionsSection transactions={transactions} />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user