import { useState } from 'react' import { useNavigate } from '@tanstack/react-router' import { CircularProgress } from '@/components/CircularProgress' import { useTestStore } from '@/store/test-store' import { TOEIC_PARTS } from '@/data/mock-data' import { fetchQuestions } from '@/hooks/use-questions' import { useRequireAuth } from '@/hooks/use-require-auth' export function ToeicPractice() { const navigate = useNavigate() const { startExam } = useTestStore() const [loadingPartId, setLoadingPartId] = useState(null) const { requireAuth } = useRequireAuth() async function handleSelectPart(partId: number, partName: string) { if (!requireAuth()) return setLoadingPartId(partId) try { const questions = await fetchQuestions(partId, 10) startExam(partId, partName, questions) navigate({ to: '/toeic/session' }) } catch (err) { console.error('Failed to load questions:', err) } finally { setLoadingPartId(null) } } return (

Chọn Part TOEIC

Hệ thống ôn luyện theo cấu trúc bài thi TOEIC thực tế. Chọn phần cụ thể để bắt đầu.

{TOEIC_PARTS.map((part) => ( ))} {/* Full Test card */}
{/* Tip */}
tips_and_updates
Mẹo luyện thi

Bắt đầu từ Part 5 (Điền từ) — phần mang lại điểm nhanh nhất vì không phụ thuộc kỹ năng nghe. Mỗi ngày 20 câu, sau 2 tuần bạn sẽ thấy cải thiện rõ rệt.

) }