// The chunk's passage, set like the Reader. Click a verse number to open its // interlinear words; click an original word to add it to the chunk's word study. import { useState } from 'react'; import { NT_BOOK_NUMBER } from '../../utils/bibleUtils.jsx'; export default function ScripturePane({ verses, chapter, interlinear, interlinearLoading, addedStrongs, onPickWord }) { const [openVerse, setOpenVerse] = useState(null); const isHebrew = chapter && !NT_BOOK_NUMBER[chapter.bookAbbrev]; return (
{verses.map((v) => { const words = v.chapter === chapter?.chapter ? interlinear?.[String(v.number)] : null; const open = openVerse === `${v.chapter}:${v.number}`; return (
{v.text} {open && words && (
{words.map((w, i) => { const added = w.s && addedStrongs.has(w.s.toUpperCase()); return ( ); })}
)}
); })}
{interlinearLoading &&

Loading original words…

} {!interlinearLoading && interlinear &&

Click a verse number to see its original words; click a word to study it.

}
); }