Remove CharacterComponent and CharacterDetail components
- Deleted `CharacterComponent` and `CharacterDetail` files from the project. - Refactored related logic to improve code maintainability and reduce redundancy.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {useContext, useState} from "react";
|
||||
import React, {useContext, useState} from "react";
|
||||
import {ChapterProps, chapterVersions} from "@/lib/models/Chapter";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
@@ -10,7 +10,6 @@ import {SelectBoxProps} from "@/shared/interface";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import Book, {BookProps} from "@/lib/models/Book";
|
||||
import Modal from "@/components/Modal";
|
||||
import BookSetting from "@/components/book/settings/BookSetting";
|
||||
import SelectBox from "@/components/form/SelectBox";
|
||||
import {useTranslations} from "next-intl";
|
||||
@@ -28,7 +27,7 @@ export default function ScribeControllerBar() {
|
||||
const t = useTranslations();
|
||||
const {lang, setLang} = useContext<LangContextProps>(LangContext);
|
||||
const {isCurrentlyOffline} = useContext<OfflineContextType>(OfflineContext)
|
||||
const {serverOnlyBooks,localOnlyBooks} = useContext<BooksSyncContextProps>(BooksSyncContext);
|
||||
const {serverSyncedBooks, serverOnlyBooks, localOnlyBooks} = useContext<BooksSyncContextProps>(BooksSyncContext);
|
||||
|
||||
const isGPTEnabled: boolean = !isCurrentlyOffline() && QuillSense.isOpenAIEnabled(session);
|
||||
const isGemini: boolean = !isCurrentlyOffline() && QuillSense.isOpenAIEnabled(session);
|
||||
@@ -79,6 +78,7 @@ export default function ScribeControllerBar() {
|
||||
totalWordCount: response.desiredWordCount,
|
||||
quillsenseEnabled: response.quillsenseEnabled,
|
||||
tools: response?.tools,
|
||||
seriesId: response.seriesId,
|
||||
});
|
||||
} catch (e: unknown) {
|
||||
if (e instanceof Error) {
|
||||
@@ -174,17 +174,7 @@ export default function ScribeControllerBar() {
|
||||
</div>
|
||||
<UserMenu/>
|
||||
</div>
|
||||
{
|
||||
showSettingPanel &&
|
||||
<Modal title={t("controllerBar.bookSettings")}
|
||||
size={'large'}
|
||||
onClose={() => setShowSettingPanel(false)}
|
||||
onConfirm={() => {
|
||||
}}
|
||||
children={<BookSetting/>}
|
||||
enableFooter={false}
|
||||
/>
|
||||
}
|
||||
{showSettingPanel && <BookSetting onClose={() => setShowSettingPanel(false)}/>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user