Fix date format after sync

The date and time format was incorrect after syncing data from the cloud. This commit addresses the issue.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 10:48:06 +00:00
parent 1d911153a7
commit f558a0149d
5 changed files with 55 additions and 13 deletions

View File

@@ -2,6 +2,7 @@
import { supabase } from '@/lib/supabase';
import { Transaction } from '@/components/TransactionCard';
import { isSyncEnabled } from '../syncSettings';
import { formatDateForDisplay } from './dateUtils';
/**
* Download transaction data from Supabase to local storage
@@ -34,9 +35,10 @@ export const downloadTransactions = async (userId: string): Promise<void> => {
id: t.transaction_id || t.id,
title: t.title,
amount: t.amount,
date: t.date,
date: t.date ? formatDateForDisplay(t.date) : '날짜 없음',
category: t.category,
type: t.type
type: t.type,
notes: t.notes
}));
// 기존 로컬 데이터 불러오기