export const sliceData = (rows, page, elementOnPage) => {
    if (!rows || rows.length === 0) {
        return [];
    }

    const maxPage = Math.ceil(rows.length / elementOnPage);
    // const start = (page - 1) * elementOnPage;
    const start = 0;
    console.log(maxPage, start)
    let end;
    if (page === maxPage) {
        end = rows.length;
    } else {
        end = start + elementOnPage;
    }

    return rows.slice(start, end);
}