- Deleted `CharacterComponent` and `CharacterDetail` files from the project. - Refactored related logic to improve code maintainability and reduce redundancy.
26 lines
909 B
TypeScript
26 lines
909 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/SettingsPanel";
|
|
import {useTranslations} from "next-intl";
|
|
|
|
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 setting={currentSetting}/>
|
|
</SettingsPanel>
|
|
);
|
|
}
|