Skip to content

Commit

Permalink
fix: use data-theme for comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazawazi committed May 24, 2024
1 parent 07b7dd1 commit 84328d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/GiscusComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Giscus from "@giscus/react"
import { useEffect, useRef, useState } from "react"

const GiscusComment = () => {
const [theme, setTheme] = useState('preferred_color_scheme')
const [theme, setTheme] = useState(document.documentElement.getAttribute('data-theme'))
const observerLock = useRef(false)

const updateTheme = () => {
Expand Down

0 comments on commit 84328d4

Please sign in to comment.