We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd5e1e commit 2046fedCopy full SHA for 2046fed
src/components/LinkList.js
@@ -170,14 +170,17 @@ class LinkList extends Component {
170
171
const linksToRender = this._getLinksToRender(data)
172
const isNewPage = this.props.location.pathname.includes('new')
173
+ const pageIndex = this.props.match.params.page
174
+ ? (this.props.match.params.page - 1) * LINKS_PER_PAGE
175
+ : 0
176
177
return (
178
<Fragment>
179
{linksToRender.map((link, index) => (
180
<Link
181
key={link.id}
182
link={link}
- index={index}
183
+ index={index + pageIndex}
184
updateStoreAfterVote={this._updateCacheAfterVote}
185
/>
186
))}
0 commit comments