From 9e6193c49d97a1e23dc7c6c3f2d9513c29bb2b1d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 7 May 2023 19:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{TwikooCommenCount.js => TwikooCommentCount.js} | 0 components/TwikooCommentCounter.js | 3 +-- components/TwikooRecentComments.js | 12 ++++++++++++ themes/example/components/BlogPostCard.js | 2 +- themes/hexo/components/BlogPostCardInfo.js | 2 +- themes/matery/components/BlogPostCard.js | 2 +- themes/medium/components/BlogPostCard.js | 2 +- themes/next/components/BlogPostCard.js | 2 +- themes/simple/components/BlogItem.js | 2 +- 9 files changed, 19 insertions(+), 8 deletions(-) rename components/{TwikooCommenCount.js => TwikooCommentCount.js} (100%) create mode 100644 components/TwikooRecentComments.js diff --git a/components/TwikooCommenCount.js b/components/TwikooCommentCount.js similarity index 100% rename from components/TwikooCommenCount.js rename to components/TwikooCommentCount.js diff --git a/components/TwikooCommentCounter.js b/components/TwikooCommentCounter.js index 4f3f9218..448b51b8 100644 --- a/components/TwikooCommentCounter.js +++ b/components/TwikooCommentCounter.js @@ -66,8 +66,7 @@ const TwikooCommentCounter = (props) => { if (props?.posts && props?.posts?.length > 0) { fetchTwikooData(props.posts) } - // }, [router.events]) - }) + }, [router.events]) // 监控主题变化时的的评论数 useEffect(() => { diff --git a/components/TwikooRecentComments.js b/components/TwikooRecentComments.js new file mode 100644 index 00000000..306b17a2 --- /dev/null +++ b/components/TwikooRecentComments.js @@ -0,0 +1,12 @@ + +/** + * 显示最近评论 TODO + * @returns {JSX.Element} + * @constructor + */ + +const TwikooRecentComments = (props) => { + return null +} + +export default TwikooRecentComments diff --git a/themes/example/components/BlogPostCard.js b/themes/example/components/BlogPostCard.js index 7f4b54ac..b773e29f 100644 --- a/themes/example/components/BlogPostCard.js +++ b/themes/example/components/BlogPostCard.js @@ -1,7 +1,7 @@ import BLOG from '@/blog.config' import CONFIG_EXAMPLE from '../config_example' import Link from 'next/link' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' const BlogPostCard = ({ post }) => { const showPageCover = CONFIG_EXAMPLE.POST_LIST_COVER diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index fe27bee8..31288658 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -2,7 +2,7 @@ import BLOG from '@/blog.config' import NotionPage from '@/components/NotionPage' import Link from 'next/link' import TagItemMini from './TagItemMini' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' /** * 博客列表的文字内容 diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index 9c1b5bda..fd5c5163 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -3,7 +3,7 @@ import Link from 'next/link' import React from 'react' import TagItemMini from './TagItemMini' import CONFIG_MATERY from '../config_matery' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' // import Image from 'next/image' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index df8ccb83..051bd5a3 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -6,7 +6,7 @@ import React from 'react' import CONFIG_MEDIUM from '../config_medium' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MEDIUM.POST_LIST_PREVIEW && post.blockMap diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index 36d7274b..97fe08ad 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -8,7 +8,7 @@ import TagItemMini from './TagItemMini' import CONFIG_NEXT from '../config_next' import NotionPage from '@/components/NotionPage' import NotionIcon from '@/components/NotionIcon' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() diff --git a/themes/simple/components/BlogItem.js b/themes/simple/components/BlogItem.js index 3c8277cc..c99092b7 100644 --- a/themes/simple/components/BlogItem.js +++ b/themes/simple/components/BlogItem.js @@ -1,7 +1,7 @@ import BLOG from '@/blog.config' import Link from 'next/link' import CONFIG_SIMPLE from '../config_simple' -import TwikooCommentCount from '@/components/TwikooCommenCount' +import TwikooCommentCount from '@/components/TwikooCommentCount' export const BlogItem = props => { const { post } = props