BlogPostCard 去掉tags构造参数

This commit is contained in:
tangly1024
2022-01-06 17:41:46 +08:00
parent 7deaabc1c4
commit b16b3dee59
3 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faFolder } from '@fortawesome/free-solid-svg-icons'
import TagItemMini from './TagItemMini'
const BlogPostCard = ({ post, tags }) => {
const BlogPostCard = ({ post }) => {
return (
<div key={post.id} className='shadow animate__animated animate__fadeIn flex xl:flex-row flex-col-reverse justify-between md:hover:shadow-xl duration-300
w-full bg-white dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-600'>

View File

@@ -43,7 +43,7 @@ const BlogPostListPage = ({ page = 1, posts = [], tags }) => {
{/* 文章列表 */}
<div className="flex flex-wrap space-y-8 mx-5 md:mx-0">
{postsToShow.map(post => (
<BlogPostCard key={post.id} post={post} tags={tags} />
<BlogPostCard key={post.id} post={post} />
))}
</div>

View File

@@ -14,7 +14,7 @@ import { useGlobal } from '@/lib/global'
* @returns {JSX.Element}
* @constructor
*/
const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory, currentTag }) => {
const BlogPostListScroll = ({ posts = [], currentSearch, currentCategory, currentTag }) => {
const postsPerPage = BLOG.postsPerPage
const [page, updatePage] = useState(1)
const postsToShow = getPostByPage(page, posts, postsPerPage)
@@ -58,7 +58,7 @@ const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory,
{/* 文章列表 */}
<div className='flex flex-wrap space-y-8 mx-5 md:mx-0'>
{postsToShow.map(post => (
<BlogPostCard key={post.id} post={post} tags={tags}/>
<BlogPostCard key={post.id} post={post}/>
))}
</div>