- 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.
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
'use client'
|
|
import {useState} from "react";
|
|
import SeriesSettingSidebar from "@/components/series/SeriesSettingSidebar";
|
|
import SeriesSettingOption from "@/components/series/SeriesSettingOption";
|
|
import {SeriesContext} from "@/context/SeriesContext";
|
|
import {useTranslations} from '@/lib/i18n';
|
|
import SettingsPanel from "@/components/ui/SettingsPanel";
|
|
|
|
interface SeriesSettingProps {
|
|
seriesId: string;
|
|
onClose: () => void;
|
|
}
|
|
|
|
export default function SeriesSetting({seriesId, onClose}: SeriesSettingProps) {
|
|
const t = useTranslations();
|
|
const [currentSetting, setCurrentSetting] = useState<string>('basic-information');
|
|
|
|
return (
|
|
<SeriesContext.Provider value={{seriesId}}>
|
|
<SettingsPanel
|
|
title={t("bookList.seriesSettings")}
|
|
sidebar={
|
|
<SeriesSettingSidebar
|
|
selectedSetting={currentSetting}
|
|
setSelectedSetting={setCurrentSetting}
|
|
seriesId={seriesId}
|
|
onClose={onClose}
|
|
/>
|
|
}
|
|
onClose={onClose}
|
|
>
|
|
<SeriesSettingOption setting={currentSetting}/>
|
|
</SettingsPanel>
|
|
</SeriesContext.Provider>
|
|
);
|
|
}
|