diff --git a/src/app/components/bingo.tsx b/src/app/components/bingo.tsx index 255670c..bdd7a27 100644 --- a/src/app/components/bingo.tsx +++ b/src/app/components/bingo.tsx @@ -6,10 +6,11 @@ interface Props{ } export default function Bingo({size, items}: Props){ + const activeItems: string[] = items.slice(0, size*size); let rows: string[][] = []; - for(let i = 0; i < (items.length / size); i++) + for(let i = 0; i < (activeItems.length / size); i++) { - rows[i] = items.slice(i * size, (i + 1) * size); + rows[i] = activeItems.slice(i * size, (i + 1) * size); } return(