// Cue Card Bank — free, low-stakes Speaking practice (Part 1 / 2 / 3). // Standalone from the scored mock tests: no microphone, no recording, no AI scoring, // no backend calls. Just browse questions and, for Part 2, run a prep + speak timer. // The prep/talk countdown below replicates the pattern from mock-tests.jsx's // Part2PrepStep (setTimeout-based countdown, manual "ready" click) — kept local so this // file has no dependency on the scored mock-test runner. function CueCardBank({ state, update }) { const [part, setPart] = useState(2); const [theme, setTheme] = useState('all'); const [expandedId, setExpandedId] = useState(null); const [practiceCard, setPracticeCard] = useState(null); const part2Pool = useMemo(() => { return theme === 'all' ? window.PART2_CARDS : window.PART2_CARDS.filter(c => c.theme === theme); }, [theme]); const switchPart = (p) => { setPart(p); setTheme('all'); setExpandedId(null); }; if (practiceCard) { return setPracticeCard(null)} />; } return (
Speaking · Free practice bank

Cue card bank.

Rehearse Part 1, 2, and 3 speaking questions any time — no sign-in, no recording, no scoring. Just practice.

{[1, 2, 3].map(p => ( ))}
{part === 2 && ( <>
{window.PART2_THEMES.map(t => ( ))}
{part2Pool.length} cue card{part2Pool.length === 1 ? '' : 's'}
{part2Pool.map(c => { const isOpen = expandedId === c.id; const themeMeta = window.PART2_THEMES.find(t => t.id === c.theme); return (
setExpandedId(isOpen ? null : c.id)}>
{themeMeta?.label}
{c.cue}
{isOpen && (
e.stopPropagation()}>
    {c.points.map((pt, i) =>
  • {pt}
  • )}
)}
); })}
)} {(part === 1 || part === 3) && ( )}
); } // ─── Part 1 / Part 3 topic browser (simple accordion) ───────────────────── function TopicBrowser({ topics, expandedId, setExpandedId }) { return (
{topics.map(t => { const isOpen = expandedId === t.id; return (
{isOpen && (
    {t.questions.map((q, i) =>
  1. {q}
  2. )}
)}
); })}
); } // ─── Part 2 practice flow: prep countdown → speak countdown → done ──────── function Part2Practice({ card, onExit }) { const [phase, setPhase] = useState('prep'); // 'prep' | 'talk' | 'done' return (
Part 2 · Free practice

{card.cue}

    {card.points.map((pt, i) =>
  • {pt}
  • )}
{phase === 'prep' && ( setPhase('talk')} /> )} {phase === 'talk' && ( setPhase('done')} /> )} {phase === 'done' && (
✓ Nice work.
)}
); } // Countdown replicates Part2PrepStep's pattern (mock-tests.jsx): setTimeout ticks the // remaining seconds down to 0 and then simply stops — it never auto-advances the phase, // the learner always clicks through themselves. function Countdown({ seconds, label, doneLabel, buttonLabel, onNext }) { const [remaining, setRemaining] = useState(seconds); useEffect(() => { if (remaining <= 0) return; const t = setTimeout(() => setRemaining(r => r - 1), 1000); return () => clearTimeout(t); }, [remaining]); const display = seconds > 60 ? `${String(Math.floor(remaining / 60)).padStart(2, '0')}:${String(remaining % 60).padStart(2, '0')}` : `${remaining}s`; return (
{remaining <= 0 ? doneLabel : label}
{display}
); } Object.assign(window, { CueCardBank });