Files
NotionNext/components/TwikooCommentCount.js
tangly1024 9e6193c49d 变量名
2023-05-07 19:05:32 +08:00

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