Files
ERitors-Scribe-Desktop/components/editor/ScribeEditor.tsx
natreex ceaecb19fc Remove ExportBook component and integrate new export workflows
- Deleted `ExportBook` component and its usage in `BookCard.tsx`.
- Integrated improved book export workflows in `BookSettingOption` for better user experience.
- Updated database models and repositories to support export options with chapter/version selection.
- Added localization support for export-related messages and tooltips.
- Upgraded dependencies to include libraries required for export formats (e.g., DOCX, PDF, EPUB).
- Bumped app version to 0.4.1.
2026-03-05 16:31:56 -05:00

34 lines
1.3 KiB
TypeScript

import {useContext, useState} from "react";
import {ChapterContext} from "@/context/ChapterContext";
import {BookContext} from "@/context/BookContext";
import {SettingBookContext} from "@/context/SettingBookContext";
import TextEditor from "./TextEditor";
import BookList from "@/components/book/BookList";
import BookSettingOption from "@/components/book/settings/BookSettingOption";
import NoBookHome from "@/components/editor/NoBookHome";
export default function ScribeEditor() {
const {chapter} = useContext(ChapterContext);
const {book} = useContext(BookContext);
const [bookSettingId, setBookSettingId] = useState<string>('');
return (
<SettingBookContext.Provider value={{bookSettingId, setBookSettingId}}>
<div className="flex-1 min-w-0 bg-darkest-background">
{
chapter ? (
<TextEditor/>
) : book ? (
<NoBookHome/>
) : book === null ? (
<BookList/>
) : bookSettingId && (
<BookSettingOption setting={bookSettingId}/>
)
}
</div>
</SettingBookContext.Provider>
);
}