'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.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' && (
學習統計
每日學習趨勢(過去7天)
{[15, 20, 18, 25, 22, 30, 12].map((value, index) => (
))}
)}
)
}
export default function DashboardPage() {
return (
)
}