Skip to content

Commit

Permalink
pagnation mobile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerneo committed Dec 30, 2023
1 parent 9088b38 commit 6bf8d9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/albums.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ class LoadMovies {
const totalPages = Math.ceil(movies.length / moviesOnPage);

const generatePagination = (currentPage) => {
const maxVisiblePages = 5;
// const maxVisiblePages = 5;
const maxVisiblePages = $(window).width() > 960 ? 5 : 3;

const halfVisible = Math.floor(maxVisiblePages / 2);

let startPage = Math.max(1, currentPage - halfVisible);
Expand Down

0 comments on commit 6bf8d9f

Please sign in to comment.