diff --git a/src/pages/Analytics.tsx b/src/pages/Analytics.tsx index e0f3c8e..6b52d5a 100644 --- a/src/pages/Analytics.tsx +++ b/src/pages/Analytics.tsx @@ -4,6 +4,7 @@ import ExpenseChart from '@/components/ExpenseChart'; import AddTransactionButton from '@/components/AddTransactionButton'; import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Legend } from 'recharts'; import { ChevronLeft, ChevronRight } from 'lucide-react'; + const Analytics = () => { const [selectedPeriod, setSelectedPeriod] = useState('이번 달'); @@ -48,10 +49,12 @@ const Analytics = () => { income: 2550000, expense: 1740000 }]; + const totalIncome = 2550000; const totalExpense = 1740000; const savings = totalIncome - totalExpense; const savingsPercentage = Math.round(savings / totalIncome * 100); + return