Skip to content

Commit

Permalink
Connected the translation helps resources with Editor panel
Browse files Browse the repository at this point in the history
  • Loading branch information
vipinpaul committed Jan 4, 2024
1 parent b4e45d7 commit a0a34bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion renderer/src/components/EditorPage/TextEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function TextEditor() {

const {
state: { bookId, selectedFont },
actions: { handleSelectedFont },
actions: { handleSelectedFont, onChangeChapter, onChangeVerse },
} = useContext(ReferenceContext);

const {
Expand All @@ -56,6 +56,12 @@ export default function TextEditor() {
setBookChange(true);
}, [bookId]);

useEffect(() => {
onChangeChapter(chapterNumber, 1);
onChangeVerse(verseNumber, 1);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [chapterNumber, verseNumber]);

const { catalog } = useCatalog({ proskomma, stateId, verbose });
const { id: docSetId, documents } = (done && catalog.docSets[0]) || {};
if (done) {
Expand Down

0 comments on commit a0a34bf

Please sign in to comment.