diff --git a/src/components/posts/Post.jsx b/src/components/posts/Post.jsx index f6262e80b8c17e47676ab928f34abcdfa215ef14..6c996cb23f01b0dbd52a63d2842035c036943dfe 100644 --- a/src/components/posts/Post.jsx +++ b/src/components/posts/Post.jsx @@ -338,4 +338,4 @@ const Post = ({ ); }; -export default Post; +export default React.memo(Post); diff --git a/src/components/posts/PostList.jsx b/src/components/posts/PostList.jsx index e80a6fdde6b25797c5bdb855e30f0eb32569ab71..e4f1f7ce76859335269ffeedda0f4fe076209e60 100644 --- a/src/components/posts/PostList.jsx +++ b/src/components/posts/PostList.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; +import React, { useCallback, useMemo, useState } from "react"; import classNames from "classnames"; import Post from "./Post"; @@ -50,11 +50,6 @@ const PostList = ({ onRejectProcedureProposalByChairman ); - // Reset window when items change (possibly due to filtering). - useEffect(() => { - setWindow(windowSize); - }, [items, setWindow]); - const onPostSeen = useCallback( (post) => () => { if (!post.seen) {