From 4f0c0dbafc51de1dda272c3deeb403a365a3ca0f Mon Sep 17 00:00:00 2001 From: Vips19 Date: Fri, 24 Jul 2020 00:39:13 +0530 Subject: [PATCH] changes for #66 --- client/src/components/Pagination/index.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/components/Pagination/index.jsx b/client/src/components/Pagination/index.jsx index 9302cc8..d155897 100644 --- a/client/src/components/Pagination/index.jsx +++ b/client/src/components/Pagination/index.jsx @@ -8,6 +8,10 @@ export default function Pagination({ currentPage, numPages, onChangePage }) { const search = useSearch(); const changePage = (newPageNumber) => { + window.scrollTo({ + top: 0, + behavior: "smooth", + }); if (onChangePage) { onChangePage(newPageNumber); return;