diff --git a/components/Comment.js b/components/Comment.js index 613fad88..570d122d 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -1,7 +1,6 @@ import BLOG from '@/blog.config' import dynamic from 'next/dynamic' import Tabs from '@/components/Tabs' -import { useGlobal } from '@/lib/global' import React from 'react' import { useRouter } from 'next/router' @@ -50,7 +49,6 @@ const ValineComponent = dynamic(() => import('@/components/ValineComponent'), { }) const Comment = ({ frontMatter }) => { - const { isDarkMode } = useGlobal() const router = useRouter() React.useEffect(() => { @@ -87,7 +85,7 @@ const Comment = ({ frontMatter }) => { {BLOG.COMMENT_GISCUS_REPO && (
- +
)} diff --git a/components/Giscus.js b/components/Giscus.js index 7a3a5e97..605430da 100644 --- a/components/Giscus.js +++ b/components/Giscus.js @@ -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 ( {