Skip to content

Commit

Permalink
Merge pull request #34 from mrkyns/fixin/comments_layout
Browse files Browse the repository at this point in the history
adjusted comment layout to article
  • Loading branch information
StephanUllmann authored Apr 24, 2023
2 parents 2f4429a + 8087d52 commit c812b4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Pagination.jsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -68,6 +68,10 @@ export default function Pagination({
setObjectID("");
};

useEffect(() => {
window.scrollTo({ top: 0 });
}, [currentItems]);

if (items?.length > 0) {
if (objectID) {
return (
Expand Down

0 comments on commit c812b4e

Please sign in to comment.