How can I make Google Chrome Dev Tools width the same as window.innerWidth
PS: window.screen.width solved my problem
You should make a generic function.
function paginate(array, page_size, page_number) {
return array.slice((page_number - 1) * page_size, page_number * page_size);
}
called this function whenever your screen size changes. First, try to get the data accordingly then fix the UI with CSS.