mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
refactor: add key BlogsList
This commit is contained in:
@@ -131,15 +131,16 @@ const BlogsList = ({ data = BLOGSLIST_DATA }:BlogsListProps) => {
|
||||
const onPageChange = (page:number) => {
|
||||
setCurrentPage(page)
|
||||
}
|
||||
|
||||
return (
|
||||
<section>
|
||||
<div className={s.wrapper}>
|
||||
<div className={s.list}>
|
||||
{
|
||||
data.slice(currentPage*defaultBlogPageSize,(currentPage+1)*defaultBlogPageSize).map((product,index)=>{
|
||||
data.slice(currentPage*defaultBlogPageSize,(currentPage+1)*defaultBlogPageSize).map((product,index)=> {
|
||||
return(
|
||||
<div className={s.card}>
|
||||
<CardBlog {...product} key={index}/>
|
||||
<div className={s.card} key={`${product.title}-${index}`}>
|
||||
<CardBlog {...product} />
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
Reference in New Issue
Block a user