From 40ddcee1da481a2ed38e2def793a0459c315bab5 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:41:42 +0000 Subject: [PATCH] Fix: Resolve TypeScript errors The type `Transaction` was missing the `localTimestamp` property, causing TypeScript errors in `downloadTransaction.ts` and `uploadTransaction.ts`. This commit adds the `localTimestamp` property to the `Transaction` interface to resolve these errors. --- src/components/TransactionCard.tsx | 3 ++- src/contexts/budget/types.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/TransactionCard.tsx b/src/components/TransactionCard.tsx index 968fda5..7d08b43 100644 --- a/src/components/TransactionCard.tsx +++ b/src/components/TransactionCard.tsx @@ -1,4 +1,3 @@ - import React, { useState } from 'react'; import { cn } from '@/lib/utils'; import TransactionEditDialog from './TransactionEditDialog'; @@ -14,6 +13,8 @@ export type Transaction = { category: string; type: 'expense' | 'income'; notes?: string; // notes 필드를 옵셔널로 추가 + localTimestamp?: string; // 로컬 수정 타임스탬프 추가 + serverTimestamp?: string; // 서버 타임스탬프 추가 }; interface TransactionCardProps { diff --git a/src/contexts/budget/types.ts b/src/contexts/budget/types.ts index 420a919..1a750b4 100644 --- a/src/contexts/budget/types.ts +++ b/src/contexts/budget/types.ts @@ -40,5 +40,7 @@ export interface Transaction { date: string; category: string; type: 'income' | 'expense'; - notes?: string; // notes 필드를 옵셔널로 추가 + notes?: string; + localTimestamp?: string; // 로컬 수정 타임스탬프 추가 + serverTimestamp?: string; // 서버 타임스탬프 추가 }