From 22b0eb43bb9abd02be3eac8286c06f2f4806f6cf Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 29 Mar 2024 17:09:27 +0200 Subject: [PATCH] fix: posts sorting on sidebar Fix wrong sorting when a user creates several posts without the page reloading. --- src/discussions/posts/PostsList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discussions/posts/PostsList.jsx b/src/discussions/posts/PostsList.jsx index 28c30c49c..8a697ede4 100644 --- a/src/discussions/posts/PostsList.jsx +++ b/src/discussions/posts/PostsList.jsx @@ -67,7 +67,7 @@ const PostsList = ({ if (isTopicTab) { loadThreads(topicsIds, 1, true); } - }, [filters]); + }, [filters, JSON.stringify(sortedPostsIds)]); const postInstances = useMemo(() => ( sortedPostsIds?.map((postId, idx) => (