Merge branch 'main' into deploy/preview.tangly1024.com

This commit is contained in:
tangly1024.com
2024-04-12 16:27:16 +08:00

View File

@@ -16,12 +16,12 @@ const GiscusComponent = () => {
const theme = isDarkMode ? 'dark' : 'light'
useEffect(() => {
loadExternalResource('/js/giscus.js', 'js').then(() => {
if (window.Giscus) {
window.Giscus.init('#giscus')
if (window?.Giscus?.init) {
window?.Giscus?.init('#giscus')
}
})
return () => {
window.Giscus.destroy()
window?.Giscus?.destroy()
}
}, [isDarkMode])