diff --git a/src/App.jsx b/src/App.jsx index a603d00..3298967 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -32,12 +32,12 @@ import { BadgeSection } from './domains/badge' import CatchmindLobbyPage from './domains/games/pages/CatchmindLobbyPage' import CatchmindWaitingPage from './domains/games/pages/CatchmindWaitingPage' import CatchmindPlayPage from './domains/games/pages/CatchmindPlayPage' -import {NewsListPage, NewsDetailPage, NewsQuizPage, NewsWordsPage, NewsStatsPage} from './domains/news' -import {dailyService, statsService} from './domains/vocab/services/vocabService' -import {getNewsStats, getDashboardStats} from './domains/news/services/newsService' -import {useChat} from './contexts/ChatContext' -import {useSettings} from './contexts/SettingsContext' -import {useAuth} from './contexts/AuthContext' +import { NewsListPage, NewsDetailPage, NewsQuizPage, NewsWordsPage, NewsStatsPage } from './domains/news' +import { dailyService, statsService } from './domains/vocab/services/vocabService' +import { getNewsStats, getDashboardStats } from './domains/news/services/newsService' +import { useChat } from './contexts/ChatContext' +import { useSettings } from './contexts/SettingsContext' +import { useAuth } from './contexts/AuthContext' import LoginPage from './pages/Login' import SignUpPage from './pages/SignUp' @@ -93,7 +93,8 @@ function PublicRoute({ children }) { function Dashboard() { const navigate = useNavigate() const [expandedCard, setExpandedCard] = useState(null) - const {t, isKorean} = useSettings() + const { t } = useSettings() + const { t, isKorean } = useSettings() const [activityData, setActivityData] = useState(null) const [loadingActivity, setLoadingActivity] = useState(true) @@ -466,14 +467,14 @@ function Dashboard() { {/* Today's Activity Stats */} - + {loadingActivity ? ( {[...Array(4)].map((_, i) => ( - - - - + + + + @@ -482,7 +483,7 @@ function Dashboard() { ) : ( {/* 오늘 외운 단어 */} - + navigate('/vocab')} sx={{ @@ -496,7 +497,7 @@ function Dashboard() { }, }} > - + - + {activityData?.todayWords || 0} @@ -527,7 +528,7 @@ function Dashboard() { {/* 읽은 뉴스 */} - + navigate('/news')} sx={{ @@ -541,7 +542,7 @@ function Dashboard() { }, }} > - + - + {activityData?.newsRead || 0} @@ -567,7 +568,7 @@ function Dashboard() { {/* 총 학습 단어 */} - + navigate('/vocab/words')} sx={{ @@ -581,7 +582,7 @@ function Dashboard() { }, }} > - + - + {activityData?.totalWords || 0} @@ -607,7 +608,7 @@ function Dashboard() { {/* 연속 학습 */} - + navigate('/reports')} sx={{ @@ -621,7 +622,7 @@ function Dashboard() { }, }} > - + - + {Math.max(activityData?.vocabStreak || 0, activityData?.newsStreak || 0)} @@ -665,7 +666,7 @@ function OpicPage() { function ReportsPage() { - const {isKorean} = useSettings() + const { isKorean } = useSettings() const [loading, setLoading] = useState(true) const [stats, setStats] = useState({ totalStudyDays: 0, @@ -684,7 +685,7 @@ function ReportsPage() { setLoading(true) const [vocabStatsRes, vocabHistoryRes, newsStatsRes] = await Promise.allSettled([ statsService.getOverall().catch(() => null), - statsService.getDaily(null, {limit: 30}).catch(() => null), + statsService.getDaily(null, { limit: 30 }).catch(() => null), getNewsStats().catch(() => null), ]) @@ -718,9 +719,9 @@ function ReportsPage() { if (loading) { return ( - + - + ) @@ -814,13 +815,13 @@ function ReportsPage() { {/* 뉴스 학습 통계 */} {(stats.newsRead > 0 || stats.newsQuizScore > 0) && ( - + {isKorean ? '뉴스 학습' : 'News Learning'} - - + + {stats.newsRead} @@ -829,8 +830,8 @@ function ReportsPage() { - - + + {stats.newsQuizScore}% @@ -1160,27 +1161,27 @@ function App() { }> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> {/* 404 */}