Skip to content

Commit 59a9f6a

Browse files
committed
Add first and last buttons to gameHistory component
1 parent 2d4e76f commit 59a9f6a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/gameHistory.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,14 @@ export default function GameHistory({ session, onGameClick, targetUserSecret = n
284284

285285
{pagination.totalPages > 1 && (
286286
<div className={styles.pagination}>
287+
<button
288+
className={`${styles.paginationBtn} desktop`}
289+
disabled={currentPage === 1}
290+
onClick={() => setCurrentPage(1)}
291+
>
292+
⏮ First
293+
</button>
294+
287295
<button
288296
className={styles.paginationBtn}
289297
disabled={!pagination.hasPrevPage}
@@ -306,6 +314,14 @@ export default function GameHistory({ session, onGameClick, targetUserSecret = n
306314
>
307315
{text('next')}
308316
</button>
317+
318+
<button
319+
className={`${styles.paginationBtn} desktop`}
320+
disabled={currentPage === pagination.totalPages}
321+
onClick={() => setCurrentPage(pagination.totalPages)}
322+
>
323+
Last ⏭
324+
</button>
309325
</div>
310326
)}
311327
</div>

0 commit comments

Comments
 (0)