mirror of
https://github.com/sergeyyarkov/devthread.ru.git
synced 2026-10-11 02:09:04 +03:00
fix gitalk
This commit is contained in:
parent
ebc14e30e1
commit
8d5d360791
@ -26,6 +26,9 @@ const Article = ({
|
||||
},
|
||||
} = useSiteMetadataQuery()
|
||||
const { pathname } = useLocation()
|
||||
const [readyComments, setReadyComments] = React.useState(false)
|
||||
|
||||
React.useEffect(() => setReadyComments(true), [setReadyComments])
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -108,7 +111,7 @@ const Article = ({
|
||||
<div className="article-comments">
|
||||
<div className="article-comments__heading">
|
||||
<h2>Комментарии</h2>
|
||||
<GitalkComponent
|
||||
{readyComments ? <GitalkComponent
|
||||
options={{
|
||||
clientID,
|
||||
clientSecret,
|
||||
@ -118,7 +121,7 @@ const Article = ({
|
||||
id: pathname,
|
||||
title: title,
|
||||
}}
|
||||
/>
|
||||
/> : null}
|
||||
</div>
|
||||
<div className="article-comments__content"></div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user