diff --git a/frontend/app/review/page.tsx b/frontend/app/review/page.tsx index 2fea1e8..ab5bb75 100644 --- a/frontend/app/review/page.tsx +++ b/frontend/app/review/page.tsx @@ -249,14 +249,6 @@ export default function ReviewPage() { 新增詞卡 - window.location.href = '/stats'} - className="px-8 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors font-semibold flex items-center justify-center gap-2" - > - 📊 - 查看統計 - - window.location.href = '/flashcards'} className="px-8 py-3 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors font-semibold flex items-center justify-center gap-2" diff --git a/frontend/contexts/AuthContext.tsx b/frontend/contexts/AuthContext.tsx index 406d54b..abffb4e 100644 --- a/frontend/contexts/AuthContext.tsx +++ b/frontend/contexts/AuthContext.tsx @@ -127,6 +127,8 @@ export const AuthProvider: React.FC = ({ children }) => { isAuthenticated: false, isLoading: false, }) + // 立即跳轉到登入頁面 + window.location.href = '/login' } const checkAuth = async (): Promise => {