diff --git a/src/components/snake/index.tsx b/src/components/snake/index.tsx index 899461f..313ec95 100644 --- a/src/components/snake/index.tsx +++ b/src/components/snake/index.tsx @@ -13,9 +13,9 @@ function tableHead(...cols: (string | number)[]) { const elements = cols.map((col, idx) => {col}); return {elements}; } -function tableRow(...cols: (string | number)[]) { +function tableRow(key: number, ...cols: (string | number)[]) { const elements = cols.map((col, idx) => {col}); - return {elements}; + return {elements}; } const SnakePage: FC = () => { @@ -46,7 +46,7 @@ const SnakePage: FC = () => { const labSnapsTRs = useMemo( () => - snaps.map(snap => { + snaps.map((snap, idx) => { const labsRanked = snap.labs.sort((a, b) => a.snakeLength - b.snakeLength); const avgLen = labsRanked.reduce((prev, curr) => prev + curr.snakeLength, 0) / labsRanked.length; @@ -59,7 +59,19 @@ const SnakePage: FC = () => { const q95Len = labsRanked[Math.floor(labsRanked.length * 0.95)]!.snakeLength; const maxLen = Math.max(...labsRanked.map(lab => lab.snakeLength)); - return tableRow(snap.iteration, avgLen, minLen, q20Len, q40Len, q60Len, q80Len, q90Len, q95Len, maxLen); + return tableRow( + idx, + snap.iteration, + avgLen, + minLen, + q20Len, + q40Len, + q60Len, + q80Len, + q90Len, + q95Len, + maxLen, + ); }), [snaps], ); @@ -70,8 +82,8 @@ const SnakePage: FC = () => {
- {tableHead('Itr', 'Avg', 'Min', '20%', '40%', '60%', '80%', '90%', '95%', 'Max')} - {labSnapsTRs} + {tableHead('Itr', 'Avg', 'Min', '20%', '40%', '60%', '80%', '90%', '95%', 'Max')} + {labSnapsTRs}
diff --git a/src/favicon.png b/src/favicon.png index f541a38..96470a9 100644 Binary files a/src/favicon.png and b/src/favicon.png differ