mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 03:39:45 +00:00
Добавил key к элементам массива
This commit is contained in:
1 parent
4f6ccbf4fa
commit
87596e4411
4 files changed
+27
-4
No files matched your search
@@ -10,22 +10,27 @@ import {
|
||||
|
||||
const mock = [
|
||||
{
|
||||
id: 1,
|
||||
image: drone,
|
||||
link: "/projects",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
image: ttt,
|
||||
link: "/projects",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
image: comBattle,
|
||||
link: "/projects",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
image: comBattle,
|
||||
link: "/projects",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
image: comBattle,
|
||||
link: "/projects",
|
||||
},
|
||||
@@ -36,7 +41,7 @@ function Projects({ projects = mock }) {
|
||||
<div className="block projects">
|
||||
<BlockHeading heading="Наши проекты" linkText="Все проекты" link="/projects" />
|
||||
<div className="row">
|
||||
{mock.map(item => <ProjectCard project={item} />)}
|
||||
{projects.map(item => <ProjectCard key={ item.id } project={item} />)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user