fix/dark-mode-giscus

This commit is contained in:
tangly1024.com
2023-02-15 12:40:06 +08:00
parent a835c56fec
commit 91bf84287b
3 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
import { Giscus } from '@giscus/react'
/**
@@ -8,8 +9,10 @@ import { Giscus } from '@giscus/react'
* @constructor
*/
const GiscusComponent = ({ isDarkMode }) => {
const GiscusComponent = () => {
const { isDarkMode } = useGlobal()
const theme = isDarkMode ? 'dark' : 'light'
return (
<Giscus
repo={BLOG.COMMENT_GISCUS_REPO}