- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files. - Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter. - Updated project structure and references to reflect these removals.
26 lines
934 B
TypeScript
26 lines
934 B
TypeScript
'use client'
|
|
import {useState} from "react";
|
|
import BookSettingSidebar from "@/components/book/settings/BookSettingSidebar";
|
|
import BookSettingOption from "@/components/book/settings/BookSettingOption";
|
|
import SettingsPanel from "@/components/ui/SettingsPanel";
|
|
import {useTranslations} from '@/lib/i18n';
|
|
|
|
interface BookSettingProps {
|
|
onClose: () => void;
|
|
}
|
|
|
|
export default function BookSetting({onClose}: BookSettingProps) {
|
|
const t = useTranslations();
|
|
const [currentSetting, setCurrentSetting] = useState<string>('basic-information');
|
|
|
|
return (
|
|
<SettingsPanel
|
|
title={t("controllerBar.bookSettings")}
|
|
sidebar={<BookSettingSidebar selectedSetting={currentSetting} setSelectedSetting={setCurrentSetting}/>}
|
|
onClose={onClose}
|
|
>
|
|
<BookSettingOption key={currentSetting} setting={currentSetting}/>
|
|
</SettingsPanel>
|
|
);
|
|
}
|