Fix TS2353 error in useTransactions
The object literals in createSampleTransactions function were specifying the 'notes' property, which does not exist in the Transaction type. This commit removes the 'notes' property from the object literals to resolve the TS2353 error.
This commit is contained in:
@@ -13,6 +13,7 @@ export type Transaction = {
|
||||
date: string;
|
||||
category: string;
|
||||
type: 'expense' | 'income';
|
||||
notes?: string; // notes 필드를 옵셔널로 추가
|
||||
};
|
||||
|
||||
interface TransactionCardProps {
|
||||
|
||||
@@ -40,4 +40,5 @@ export interface Transaction {
|
||||
date: string;
|
||||
category: string;
|
||||
type: 'income' | 'expense';
|
||||
notes?: string; // notes 필드를 옵셔널로 추가
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user