// Home card: once a week, write what you remember of a passage you studied, then compare it with your notes. import { useMemo, useState } from 'react'; import { useApp } from '../context/AppContext.js'; import { loadProjectById } from '../utils/projectStorage.js'; import { pickRecall } from '../utils/recall.js'; const RATE = [ { id: 'solid', label: 'I had it' }, { id: 'partly', label: 'Partly' }, { id: 'forgot', label: 'Most of it slipped' }, ]; const box = 'mb-4 rounded-xl border border-[var(--r-line)] bg-[var(--r-bar)] px-4 py-3 text-sm'; const noteLabels = [['observation', 'Observe'], ['interpretation', 'Interpret'], ['application', 'Apply']]; export default function WeeklyRecall() { const { projectIndex, saveChunkRecall, openStudyChunk } = useApp(); const [step, setStep] = useState('card'); // card -> write -> compare -> done const [text, setText] = useState(''); const [gaps, setGaps] = useState(''); const pick = useMemo( () => pickRecall(projectIndex.map((e) => loadProjectById(e.id)).filter(Boolean)), [projectIndex], ); if (step === 'done') return
{pick.reference} · {pick.projectTitle}
{step === 'write' ? ( <>From memory, no peeking: what did this passage say, what did it mean, and what did it ask of you?