From 3f03d73019c9c2882cfc7a4742484f35c3278e7e Mon Sep 17 00:00:00 2001 From: Jackson Romero Date: Sat, 13 Jan 2024 02:22:05 -0500 Subject: [PATCH] Fix pagination with unique keys --- client/src/components/metrics/AdminMetrics.tsx | 4 ++-- client/src/components/metrics/PersonalStats.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/metrics/AdminMetrics.tsx b/client/src/components/metrics/AdminMetrics.tsx index 90d8a9a..9e9ea73 100644 --- a/client/src/components/metrics/AdminMetrics.tsx +++ b/client/src/components/metrics/AdminMetrics.tsx @@ -103,7 +103,7 @@ export default function AdminMetrics() { .slice(studentPage * rowsPerStudentPage, studentPage * rowsPerStudentPage + rowsPerStudentPage) .map((row) => { return ( - + {studentCols.map((column) => { const value = row[column.id]; return ( @@ -149,7 +149,7 @@ export default function AdminMetrics() { .slice(taPage * rowsPerTAPage, taPage * rowsPerTAPage + rowsPerTAPage) .map((row) => { return ( - + {taCols.map((column) => { const value = row[column.id]; return ( diff --git a/client/src/components/metrics/PersonalStats.tsx b/client/src/components/metrics/PersonalStats.tsx index 6cdc76c..746d29f 100644 --- a/client/src/components/metrics/PersonalStats.tsx +++ b/client/src/components/metrics/PersonalStats.tsx @@ -107,9 +107,9 @@ export default function PersonalStats() { {helpedStudents .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) - .map((row) => { + .map((row, i) => { return ( - + {columns.map((column) => { const value = row[column.id]; return (