We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70e4a39 commit 88fafffCopy full SHA for 88fafff
components/Comments.tsx
@@ -5,16 +5,18 @@ import { useState } from 'react'
5
import siteMetadata from '@/data/siteMetadata'
6
7
export default function Comments({ slug }: { slug: string }) {
8
- const [loadComments, setLoadComments] = useState(false);
9
-
+ const [loadComments, setLoadComments] = useState(false)
+
10
if (!siteMetadata.comments?.provider) {
11
- return null;
+ return null
12
}
13
return (
14
+ <>
15
{loadComments ? (
16
<CommentsComponent commentsConfig={siteMetadata.comments} slug={slug} />
- ) :
17
- (<button onClick={() => setLoadComments(true)}>Load Comments</button>)
18
- }
+ ) : (
+ <button onClick={() => setLoadComments(true)}>Load Comments</button>
19
+ )}
20
+ </>
21
)
22
0 commit comments