Fix onboarding and data issues

- Fix issue where welcome dialog reappears.
- Fix issue where new expenses are not reflected.
- Improve card layout on mobile devices.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 05:47:21 +00:00
parent 50520ed254
commit f98db16d17
4 changed files with 85 additions and 45 deletions

View File

@@ -9,10 +9,12 @@ import { useBudget } from '@/contexts/BudgetContext';
import { formatCurrency } from '@/utils/formatters';
import { EXPENSE_CATEGORIES } from '@/constants/categoryIcons';
import { MONTHS_KR } from '@/hooks/useTransactions';
import { useIsMobile } from '@/hooks/use-mobile';
const Analytics = () => {
const [selectedPeriod, setSelectedPeriod] = useState('이번 달');
const { budgetData, getCategorySpending, transactions } = useBudget();
const isMobile = useIsMobile();
// 실제 예산 및 지출 데이터 사용
const totalBudget = budgetData.monthly.targetAmount;
@@ -98,7 +100,7 @@ const Analytics = () => {
return (
<div className="min-h-screen bg-neuro-background pb-24">
<div className="max-w-md mx-auto px-6">
<div className={`mx-auto px-4 ${isMobile ? 'w-full' : 'max-w-lg'}`}>
{/* Header */}
<header className="py-8">
<h1 className="text-2xl font-bold neuro-text mb-5"> </h1>