diff --git a/src/components/AddTransactionButton.tsx b/src/components/AddTransactionButton.tsx index dc1ab8e..99aa94e 100644 --- a/src/components/AddTransactionButton.tsx +++ b/src/components/AddTransactionButton.tsx @@ -7,6 +7,7 @@ import { useBudget } from '@/contexts/BudgetContext'; import { supabase } from '@/lib/supabase'; import { isSyncEnabled } from '@/utils/syncUtils'; import ExpenseForm, { ExpenseFormValues } from './expenses/ExpenseForm'; +import { Transaction } from '@/components/TransactionCard'; const AddTransactionButton = () => { const [showExpenseDialog, setShowExpenseDialog] = useState(false); @@ -27,13 +28,13 @@ const AddTransactionButton = () => { const now = new Date(); const formattedDate = `오늘, ${now.getHours()}:${now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()} ${now.getHours() >= 12 ? 'PM' : 'AM'}`; - const newExpense = { + const newExpense: Transaction = { id: Date.now().toString(), title: data.title, amount: parseInt(numericAmount), date: formattedDate, category: data.category, - type: 'expense' + type: 'expense' // 명시적으로 'expense'로 설정 }; // BudgetContext를 통해 지출 추가