'use client' import Link from 'next/link' import { useState } from 'react' import { ProtectedRoute } from '@/components/shared/ProtectedRoute' import { Navigation } from '@/components/shared/Navigation' import { useAuth } from '@/contexts/AuthContext' function DashboardContent() { const [activeTab, setActiveTab] = useState('overview') const { user, logout } = useAuth() // Mock data const stats = { totalWords: 234, wordsToday: 12, streak: 7, accuracy: 85, todayReview: 23, completedToday: 15 } const recentWords = [ { id: 1, word: 'negotiate', translation: '協商', status: 'learned' }, { id: 2, word: 'accomplish', translation: '完成', status: 'learning' }, { id: 3, word: 'perspective', translation: '觀點', status: 'new' }, { id: 4, word: 'substantial', translation: '大量的', status: 'learned' }, ] const cardSets = [ { id: 1, name: '美劇經典台詞', count: 45, progress: 60 }, { id: 2, name: '商務英文必備', count: 30, progress: 30 }, { id: 3, name: '日常對話', count: 25, progress: 80 }, ] return (
{/* Navigation */} {/* Main Content */}
{/* Welcome Section */}

歡迎回來,{user?.displayName || user?.username}! 🌟

今天有 {stats.todayReview} 個單字等待複習,繼續加油!

開始今日複習 AI 生成新詞卡
{/* Stats Grid */}
總學習單字
{stats.totalWords}
+{stats.wordsToday} 今日
連續學習
{stats.streak} 天
🔥 保持良好!
正確率
{stats.accuracy}%
上周 82%
今日進度
{stats.completedToday}/{stats.todayReview}
{/* Content Tabs */}
{activeTab === 'overview' && (

最近學習的單字

{recentWords.map(word => (
{word.word}
{word.translation}
{word.status === 'learned' ? '已掌握' : word.status === 'learning' ? '學習中' : '新詞'}
))}
)} {activeTab === 'sets' && (

我的卡組

{cardSets.map(set => (

{set.name}

{set.count} 個單字

繼續學習 →
))}
)} {activeTab === 'progress' && (

學習統計

本周學習
89 個
本月學習
312 個
平均每日
15 個
最佳紀錄
32 個
每日學習趨勢(過去7天)
{[15, 20, 18, 25, 22, 30, 12].map((value, index) => (
))}
)}
) } export default function DashboardPage() { return ( ) }