Skip to content

Commit

Permalink
Merge pull request #1 from bushblade/patch-1
Browse files Browse the repository at this point in the history
Pagination needs a key prop
  • Loading branch information
bradtraversy committed Dec 12, 2021
2 parents 12a8fa4 + 76fb9e7 commit 952af1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Pagination.js
Expand Up @@ -19,7 +19,7 @@ export default function Pagination({ currentPage, numPages }) {
</Link>
)}
{Array.from({ length: numPages }, (_, i) => (
<Link href={`/blog/page/${i + 1}`}>
<Link href={`/blog/page/${i + 1}`} key={`page-${i}`}>
<li className='relative block py-2 px-3 leading-tight bg-white border border-gray-300 text-gray-800 mr-1 hover:bg-gray-200 cursor-pointer'>
{i + 1}
</li>
Expand Down

1 comment on commit 952af1b

@vercel
Copy link

@vercel vercel bot commented on 952af1b Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.