mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
37 lines
892 B
TypeScript
37 lines
892 B
TypeScript
'use client';
|
|
|
|
import Giscus from '@giscus/react';
|
|
import { THEME_CATPUCCIN_MAP } from 'lib/consts';
|
|
import useRuaTheme from 'lib/hooks/use-rua-theme';
|
|
import { memo } from 'react';
|
|
|
|
const PostComment = () => {
|
|
const { theme } = useRuaTheme();
|
|
console.log('PostComment', theme);
|
|
|
|
return (
|
|
<>
|
|
<Giscus
|
|
repo="DefectingCat/DefectingCat.github.io"
|
|
repoId="MDEwOlJlcG9zaXRvcnkyMzk5MTUyNzk="
|
|
categoryId="DIC_kwDODkzRD84B_43T"
|
|
category="Announcements"
|
|
mapping="pathname"
|
|
reactionsEnabled="1"
|
|
emitMetadata="0"
|
|
theme={
|
|
THEME_CATPUCCIN_MAP[
|
|
(theme ?? 'latte') as keyof typeof THEME_CATPUCCIN_MAP
|
|
] === 'dark'
|
|
? 'noborder_gray'
|
|
: 'noborder_light'
|
|
}
|
|
loading="lazy"
|
|
inputPosition="top"
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default memo(PostComment);
|