Skip to content

Commit

Permalink
Refactor project card key to use projectId instead of id
Browse files Browse the repository at this point in the history
Fixes "Each child in a list should have a unique 'key' prop" when display project cards for similar projects
  • Loading branch information
HelNershingThapa committed Jun 21, 2023
1 parent 377fce9 commit ff3242e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/projectDetail/similarProjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SimilarProjects = ({ projectId }) => {
ready={!loading}
>
{similarProjects.results?.map((project) => (
<ProjectCard key={project.id} showBottomButtons={false} {...project} />
<ProjectCard key={project.projectId} showBottomButtons={false} {...project} />
))}
</ReactPlaceholder>
</div>
Expand Down

0 comments on commit ff3242e

Please sign in to comment.