upstream #1

Merged
jblu merged 1007 commits from upstream into main 2024-11-04 22:35:57 -06:00
Showing only changes of commit 88fafffd4b - Show all commits

View File

@ -5,16 +5,18 @@ import { useState } from 'react'
import siteMetadata from '@/data/siteMetadata'
export default function Comments({ slug }: { slug: string }) {
const [loadComments, setLoadComments] = useState(false);
const [loadComments, setLoadComments] = useState(false)
if (!siteMetadata.comments?.provider) {
return null;
return null
}
return (
<>
{loadComments ? (
<CommentsComponent commentsConfig={siteMetadata.comments} slug={slug} />
) :
(<button onClick={() => setLoadComments(true)}>Load Comments</button>)
}
) : (
<button onClick={() => setLoadComments(true)}>Load Comments</button>
)}
</>
)
}