[fix] reorganize some modules
This commit is contained in:
28
components/reader-page/PostComments.tsx
Normal file
28
components/reader-page/PostComments.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Config } from "@/data/config";
|
||||
import Giscus from "@giscus/react";
|
||||
import { useTheme } from "next-themes";
|
||||
|
||||
export const PostComments = (props: { postId: string }) => {
|
||||
const { theme } = useTheme();
|
||||
return (
|
||||
Config.Giscus && (
|
||||
<div className="mt-10 mb-5">
|
||||
<Giscus
|
||||
category={Config.Giscus.category}
|
||||
categoryId={Config.Giscus.categoryId}
|
||||
emitMetadata="0"
|
||||
id={props.postId}
|
||||
inputPosition="top"
|
||||
lang="en"
|
||||
loading="eager"
|
||||
mapping="pathname"
|
||||
reactionsEnabled="1"
|
||||
repo={Config.Giscus.repo as `${string}/${string}`}
|
||||
repoId={Config.Giscus.repoId}
|
||||
term={props.postId}
|
||||
theme={theme === "light" ? "light_tritanopia" : "dark_tritanopia"}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user