Browse Source

fix pagination scroll

main
matthew 2 years ago
parent
commit
eb10e4f68c
  1. 5
      searching-front/app/core/components/Pagination/Pagination.tsx
  2. 3
      searching-front/app/core/global.css

5
searching-front/app/core/components/Pagination/Pagination.tsx

@ -14,7 +14,10 @@ const Pagination = ({ currentPage, pagesCount, onPageChange }: Props) => {
<ReactPaginate
breakLabel="..."
nextLabel=">"
onPageChange={(params) => onPageChange(params.selected)}
onPageChange={(params) => {
window.scrollTo(0,0);
onPageChange(params.selected);
}}
pageRangeDisplayed={3}
pageCount={pagesCount}
previousLabel="<"

3
searching-front/app/core/global.css

@ -41,9 +41,6 @@ body {
src: url(/IBMPlexMono-Bold.woff2) format("woff2");
}
body {
background: #08c;
}
html,
#__next {
position: relative;

Loading…
Cancel
Save