|
|
@@ -1,20 +1,10 @@
|
|
|
-import clsx from "clsx";
|
|
|
-import { GetServerSideProps } from "next";
|
|
|
import Link from "next/link";
|
|
|
-import { useRouter } from "next/router";
|
|
|
-import { ReactElement, useState } from "react";
|
|
|
-import Footer from "../../../components/common/Footer";
|
|
|
-import Header from "../../../components/common/Header";
|
|
|
-import NovelCover from "../../../components/NovelCover";
|
|
|
-import styles from "../../../styles/chapter.module.scss";
|
|
|
-import { ChapterData, ChapterListData } from "../../../types/http";
|
|
|
import useGet from "../../../utils/hooks/useGet";
|
|
|
-import { get } from "../../../utils/http";
|
|
|
-import type { NextPageWithLayout } from "../../_app";
|
|
|
-import toggleTheme from "../../../libs/toggleTheme";
|
|
|
+import type { ChapterListData } from "../../../types/http";
|
|
|
+
|
|
|
+import styles from "../../../styles/chapter.module.scss";
|
|
|
|
|
|
type FontSize = 1 | 2 | 3 | 4 | 5;
|
|
|
-const fontSizes: FontSize[] = [1, 2, 3, 4, 5];
|
|
|
|
|
|
interface TocProps {
|
|
|
novel: string;
|
|
|
@@ -22,7 +12,7 @@ interface TocProps {
|
|
|
}
|
|
|
|
|
|
const Toc = (props: TocProps) => {
|
|
|
- const { novel, chapter } = props;
|
|
|
+ const { novel } = props;
|
|
|
|
|
|
const { data: { data: chapters } = { data: null } } = useGet<ChapterListData>(
|
|
|
`/api/novel/${novel}/chapters`
|