From 8b1986ab638eaf51d2f93e8de4471dcf3c650190 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 04:28:47 +0000 Subject: [PATCH] Visual edit in Lovable Edited UI in Lovable --- src/pages/Analytics.tsx | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/pages/Analytics.tsx b/src/pages/Analytics.tsx index aa12f26..0804fd1 100644 --- a/src/pages/Analytics.tsx +++ b/src/pages/Analytics.tsx @@ -4,7 +4,6 @@ import ExpenseChart from '@/components/ExpenseChart'; import AddTransactionButton from '@/components/AddTransactionButton'; import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Legend } from 'recharts'; import { ChevronLeft, ChevronRight, Wallet, CreditCard, PiggyBank } from 'lucide-react'; - const Analytics = () => { const [selectedPeriod, setSelectedPeriod] = useState('이번 달'); @@ -49,18 +48,18 @@ const Analytics = () => { budget: 2550000, expense: 1740000 }]; - + // Updated variable names to match new terminology const totalBudget = 2550000; const totalExpense = 1740000; const savings = totalBudget - totalExpense; const savingsPercentage = Math.round(savings / totalBudget * 100); - + // Custom formatter for Y-axis that removes currency symbol and uses K format const formatYAxisTick = (value: number) => { return `${Math.round(value / 1000)}K`; }; - + // Custom formatter for tooltip that keeps the original formatting with currency symbol const formatTooltip = (value: number | string) => { if (typeof value === 'number') { @@ -72,7 +71,6 @@ const Analytics = () => { } return value; }; - return
{/* Header */} @@ -97,9 +95,9 @@ const Analytics = () => { {/* Summary Cards */}
-
+
-

예산

+

예산

{new Intl.NumberFormat('ko-KR', { @@ -110,9 +108,9 @@ const Analytics = () => {

-
+
-

지출

+

지출

{new Intl.NumberFormat('ko-KR', { @@ -123,9 +121,9 @@ const Analytics = () => {

-
+
-

저축

+

저축

{savingsPercentage}% @@ -139,16 +137,14 @@ const Analytics = () => {

월별 그래프

- + @@ -196,5 +192,4 @@ const Analytics = () => {
; }; - -export default Analytics; +export default Analytics; \ No newline at end of file