From 3225d0492bc328fcf8ee8022ad965b71ac850df7 Mon Sep 17 00:00:00 2001 From: hansoo Date: Mon, 14 Jul 2025 14:25:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20BudgetProvider=20=EB=B0=8F=20isMobile=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - App.tsx에 BudgetProvider 추가로 지출 페이지 오류 해결 - SummaryCards 컴포넌트에 useIsMobile 훅 import 추가로 분석 페이지 오류 해결 - 모든 페이지가 정상적으로 작동하도록 수정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/App.tsx | 131 +++++++++++----------- src/components/analytics/SummaryCards.tsx | 2 + 2 files changed, 69 insertions(+), 64 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 35031ca..dc7f5c5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -37,6 +37,7 @@ import { ClerkProvider, ClerkDebugInfo, } from "./components/providers/ClerkProvider"; +import { BudgetProvider } from "./contexts/budget/BudgetContext"; // 페이지 컴포넌트들을 개선된 레이지 로딩으로 변경 (ChunkLoadError 재시도 포함) const Index = createLazyComponent(() => import("./pages/Index")); @@ -380,77 +381,79 @@ function App() { fallback={} showDialog={false} > - - - }> - - } /> - {/* Clerk 라우트 다시 활성화 */} - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } + + + + }> + + } /> + {/* Clerk 라우트 다시 활성화 */} + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } + /> + } + /> + } /> + } /> + } /> + + + {/* React Query 캐시 관리 */} + + - } + + + {/* 오프라인 상태 관리 */} + + - } /> - } /> - } /> - - - {/* React Query 캐시 관리 */} - - - + - {/* 오프라인 상태 관리 */} - - - + {/* 백그라운드 자동 동기화 - 성능 최적화로 30초 간격으로 조정 */} + + + - {/* 백그라운드 자동 동기화 - 성능 최적화로 30초 간격으로 조정 */} - - - + {/* 개발환경에서 Sentry 테스트 버튼 */} + + + - {/* 개발환경에서 Sentry 테스트 버튼 */} - - - + {/* 개발환경에서 Clerk 상태 디버깅 */} + - {/* 개발환경에서 Clerk 상태 디버깅 */} - + {/* 개발환경에서 환경 변수 테스트 */} + {isDevMode && } - {/* 개발환경에서 환경 변수 테스트 */} - {isDevMode && } - - {/* Clerk 디버그 및 제어 */} - - - - + {/* Clerk 디버그 및 제어 */} + + + + + {isDevMode && } diff --git a/src/components/analytics/SummaryCards.tsx b/src/components/analytics/SummaryCards.tsx index 87f9f4b..916dd5b 100644 --- a/src/components/analytics/SummaryCards.tsx +++ b/src/components/analytics/SummaryCards.tsx @@ -1,6 +1,7 @@ import React from "react"; import { Wallet, CreditCard, Coins } from "lucide-react"; import { formatCurrency } from "@/utils/currencyFormatter"; +import { useIsMobile } from "@/hooks/use-mobile"; interface SummaryCardsProps { totalBudget: number; totalExpense: number; @@ -11,6 +12,7 @@ const SummaryCards: React.FC = ({ totalExpense, _savingsPercentage, }) => { + const isMobile = useIsMobile(); // 남은 예산 계산 const remainingBudget = totalBudget - totalExpense; const isOverBudget = remainingBudget < 0;