diff --git a/src/App.css b/src/App.css index d63cf42..7f59fa0 100644 --- a/src/App.css +++ b/src/App.css @@ -519,7 +519,7 @@ nav ul li a:hover { .Comment { flex-direction: column; padding: 1.5rem; - max-width: 800px; + width: 1000px; align-items: start; color: var(--text); } diff --git a/src/components/Pagination.jsx b/src/components/Pagination.jsx index f67d78f..207c49e 100644 --- a/src/components/Pagination.jsx +++ b/src/components/Pagination.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import ReactPaginate from "react-paginate"; import Article from "./Article"; import NoResult from "./NoResult"; @@ -68,6 +68,10 @@ export default function Pagination({ setObjectID(""); }; + useEffect(() => { + window.scrollTo({ top: 0 }); + }, [currentItems]); + if (items?.length > 0) { if (objectID) { return (