Fix setup wizard when there's >20 channels

This commit is contained in:
Max Isom 2020-10-24 14:27:02 -04:00
parent 30c8068363
commit f941dbbddd
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
5 changed files with 95 additions and 15 deletions

10
src/utils/arrays.ts Normal file
View file

@ -0,0 +1,10 @@
export const chunk = <T>(arr: T[], len: number) => {
const chunks = [];
let i = 0;
while (i < arr.length) {
chunks.push(arr.slice(i, i += len));
}
return chunks;
};