mirror of
https://github.com/vercel/commerce.git
synced 2025-07-21 11:51:20 +00:00
refactor: add key BlogsList
This commit is contained in:
parent
a58d30d528
commit
e8f50beb14
@ -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>
|
||||
)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user