Fix show page navigation bugs (#9199)

Fixes total count bug that was -1 the total count
Fixes a bug when trying to go from first to last or the other way around
Fixes a React array key bug

Follow-up issue (non critical) :
https://github.com/twentyhq/twenty/issues/9197
This commit is contained in:
Lucas Bordeau
2024-12-23 14:24:15 +01:00
committed by GitHub
parent 6abe735cad
commit 691fbbe576
2 changed files with 53 additions and 22 deletions

View File

@ -15,10 +15,10 @@ export const RecordShowActionMenuButtons = () => {
return (
<>
{!isMobile &&
pinnedEntries.map((entry, index) =>
pinnedEntries.map((entry) =>
entry.shortLabel ? (
<Button
key={index}
key={entry.key}
Icon={entry.Icon}
size="small"
variant="secondary"
@ -29,6 +29,7 @@ export const RecordShowActionMenuButtons = () => {
/>
) : (
<IconButton
key={entry.key}
Icon={entry.Icon}
size="small"
variant="secondary"