diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 30948ac..538cb59 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -1,4 +1,3 @@ - import React, { useState } from 'react'; import NavBar from '@/components/NavBar'; import BudgetCard from '@/components/BudgetCard'; @@ -6,57 +5,51 @@ import TransactionCard, { Transaction } from '@/components/TransactionCard'; import AddTransactionButton from '@/components/AddTransactionButton'; import { Wallet, TrendingUp, Bell } from 'lucide-react'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; - const Index = () => { const [selectedTab, setSelectedTab] = useState("daily"); - + // Sample data - in a real app, this would come from a data source - const transactions: Transaction[] = [ - { - id: '1', - title: '식료품 구매', - amount: 25000, - date: '오늘, 12:30 PM', - category: 'shopping', - type: 'expense' - }, - { - id: '2', - title: '주유소', - amount: 50000, - date: '어제, 3:45 PM', - category: 'transportation', - type: 'expense' - }, - { - id: '3', - title: '월급', - amount: 2500000, - date: '2일전, 9:00 AM', - category: 'income', - type: 'income' - }, - ]; + const transactions: Transaction[] = [{ + id: '1', + title: '식료품 구매', + amount: 25000, + date: '오늘, 12:30 PM', + category: 'shopping', + type: 'expense' + }, { + id: '2', + title: '주유소', + amount: 50000, + date: '어제, 3:45 PM', + category: 'transportation', + type: 'expense' + }, { + id: '3', + title: '월급', + amount: 2500000, + date: '2일전, 9:00 AM', + category: 'income', + type: 'income' + }]; // 예산 데이터 - 실제 앱에서는 백엔드에서 가져와야 함 const budgetData = { daily: { targetAmount: 30000, spentAmount: 15000, - remainingAmount: 15000, + remainingAmount: 15000 }, weekly: { targetAmount: 200000, spentAmount: 120000, - remainingAmount: 80000, + remainingAmount: 80000 }, monthly: { targetAmount: 1200000, spentAmount: 750000, - remainingAmount: 450000, + remainingAmount: 450000 } }; - const formatCurrency = (amount: number) => { return new Intl.NumberFormat('ko-KR', { style: 'currency', @@ -64,16 +57,14 @@ const Index = () => { maximumFractionDigits: 0 }).format(amount); }; - - return ( -
오늘의 재정 현황
+적자 탈출 계획