diff --git a/src/components/TransactionCard.tsx b/src/components/TransactionCard.tsx index b4a0fa6..dc0b174 100644 --- a/src/components/TransactionCard.tsx +++ b/src/components/TransactionCard.tsx @@ -13,6 +13,7 @@ export type Transaction = { date: string; category: string; type: 'expense' | 'income'; + notes?: string; // notes 필드를 옵셔널로 추가 }; interface TransactionCardProps { diff --git a/src/contexts/budget/types.ts b/src/contexts/budget/types.ts index e937801..420a919 100644 --- a/src/contexts/budget/types.ts +++ b/src/contexts/budget/types.ts @@ -40,4 +40,5 @@ export interface Transaction { date: string; category: string; type: 'income' | 'expense'; + notes?: string; // notes 필드를 옵셔널로 추가 } diff --git a/src/hooks/useTransactions.ts b/src/hooks/useTransactions.ts index 417c964..1740c4b 100644 --- a/src/hooks/useTransactions.ts +++ b/src/hooks/useTransactions.ts @@ -38,7 +38,7 @@ const createSampleTransactions = (month: string): Transaction[] => { amount: 35000, category: '식비', date: `${monthIndex + 1}월 10일, ${year}`, - notes: '주간 장보기' + type: 'expense' }, { id: 'sample-2', @@ -46,7 +46,7 @@ const createSampleTransactions = (month: string): Transaction[] => { amount: 20000, category: '교통비', date: `${monthIndex + 1}월 5일, ${year}`, - notes: '월간 교통비' + type: 'expense' } ]; };