mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
23 lines
668 B
JavaScript
23 lines
668 B
JavaScript
import BLOG from '@/blog.config'
|
|
// import twikoo from 'twikoo'
|
|
|
|
/**
|
|
* 获取博客的评论数,用与在列表中展示
|
|
* @returns {JSX.Element}
|
|
* @constructor
|
|
*/
|
|
|
|
const TwikooCommentCount = ({ post, className }) => {
|
|
if (!JSON.parse(BLOG.COMMENT_TWIKOO_COUNT_ENABLE)) {
|
|
return null
|
|
}
|
|
return <a href={`${post.slug}?target=comment`} className={`mx-1 hidden comment-count-wrapper-${post.id} ${className || ''}`}>
|
|
<i className="far fa-comment mr-1"></i>
|
|
<span className={`comment-count-text-${post.id}`}>
|
|
{/* <i className='fa-solid fa-spinner animate-spin' /> */}
|
|
</span>
|
|
</a>
|
|
}
|
|
|
|
export default TwikooCommentCount
|