ВК
Size: a a a
ВК
ВК
BB
IS
АЧ
BB
IS
АЧ
АЧ
IS
IS
КК
АЧ
IS
BB
В
BB
MS
const changePagination = () => {
let from = page - Math.floor(showButtons/2);
let to = page + Math.round(showButtons/2);
if ( from < 0 ) {
to = to + Math.abs(from);
to = to > allPage ? allPage : to;
from = 0;
}
if ( to > allPage ) {
from = from - (to - allPage);
from = from < 0 ? 0 : from;
to = allPage;
}
setPaggination(range(from, to));
};