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 <ReactPaginate
breakLabel="..." breakLabel="..."
nextLabel=">" nextLabel=">"
onPageChange={(params) => onPageChange(params.selected)} onPageChange={(params) => {
window.scrollTo(0,0);
onPageChange(params.selected);
}}
pageRangeDisplayed={3} pageRangeDisplayed={3}
pageCount={pagesCount} pageCount={pagesCount}
previousLabel="<" previousLabel="<"

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

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

Loading…
Cancel
Save