import { Suspense } from 'react' import lazyPage from '../utils/lazyPage' import { Link } from 'react-router-dom' import RichText from './RichText' import QuestionReadingLinks from './QuestionReadingLinks' import { uploadUrl } from '../utils/uploads' const TeachChat = lazyPage(() => import('./TeachChat')) /** * One question, shown whole, without leaving the page you found it on. * * It is a preview, not practice: the correct option, the per-option reasoning, * the explanation and the key points are all shown at once. Making someone * answer first is the right shape for a quiz and the wrong one for a list of * questions being inspected. * * Favourites and personal folders are optional and off by default — those * belong to studying a question, not to looking through the bank. */ /* No "Add to library" here any more. It was three faults in one twelve-line block: it said library and meant collection; its dropdown was always empty, because the only page that renders this preview passes no collections; and the "New library…" input called setCollections, which does not exist in this component — so typing a name and pressing Enter created the collection, added the question, and then threw a ReferenceError. Putting a question aside belongs to the reading and session flows, where the collections are actually loaded; this is a moderator's editing preview. */ export default function QuestionPreview({ question, onClose, isFavorited, onToggleFavorite }) { return ( <>