From eb10e4f68c7a68775b74a33ec4cfdc069bc2d5e4 Mon Sep 17 00:00:00 2001 From: matthew Date: Wed, 5 Oct 2022 00:51:28 +0400 Subject: [PATCH] fix pagination scroll --- .../app/core/components/Pagination/Pagination.tsx | 5 ++++- searching-front/app/core/global.css | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/searching-front/app/core/components/Pagination/Pagination.tsx b/searching-front/app/core/components/Pagination/Pagination.tsx index eadeeae..63b476a 100644 --- a/searching-front/app/core/components/Pagination/Pagination.tsx +++ b/searching-front/app/core/components/Pagination/Pagination.tsx @@ -14,7 +14,10 @@ const Pagination = ({ currentPage, pagesCount, onPageChange }: Props) => { onPageChange(params.selected)} + onPageChange={(params) => { + window.scrollTo(0,0); + onPageChange(params.selected); + }} pageRangeDisplayed={3} pageCount={pagesCount} previousLabel="<" diff --git a/searching-front/app/core/global.css b/searching-front/app/core/global.css index 8d91bff..8b29d55 100644 --- a/searching-front/app/core/global.css +++ b/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;