export const divideArray = <T>(array: T[], size: number) => {
  const rows = [];
  for (let i = 0; i < size; i += 1) {
    rows.push(array.filter((_: T, index: number) => index % size === i));
  }
  return rows;
};
