Move import state into ImportPage; share translation list via hook

The session-list import form, preview, and runEpisodeImport now live in
ImportPage. useAvailableTranslations fetches the translation list once per
visit for both Import and Setup. Drops the never-read importFile state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Opus 5.5 committed 2026-09-22 14:50:21 -04:00
1 parent d7bbbe60de
commit 8bb3b104c8
5 files changed
+189 -190

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
import { useApp } from '../context/AppContext.js';
import { useAvailableTranslations } from '../hooks/useAvailableTranslations.js';
import { bookOptions, formatChunkReference } from '../utils/bibleUtils.jsx';
function SetupForm({ setup, availableTranslations, titleEdited, loadingChapter, errorMessage, hideTitle, onField, onTitleChange, onLoad }) {
@@ -83,7 +84,6 @@ export default function SetupPage() {
headerButtons,
project,
setup,
availableTranslations,
titleEdited, setTitleEdited,
activeChapterIndex, setActiveChapterIndex,
activeChapter,
@@ -111,6 +111,7 @@ export default function SetupPage() {
deleteChunk,
updateProject,
} = useApp();
const availableTranslations = useAvailableTranslations();
const chapterTabs = project?.chapters ?? [];