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) => {
|
const onPageChange = (page:number) => {
|
||||||
setCurrentPage(page)
|
setCurrentPage(page)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<div className={s.wrapper}>
|
<div className={s.wrapper}>
|
||||||
<div className={s.list}>
|
<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(
|
return(
|
||||||
<div className={s.card}>
|
<div className={s.card} key={`${product.title}-${index}`}>
|
||||||
<CardBlog {...product} key={index}/>
|
<CardBlog {...product} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user