Skip to content

Commit

Permalink
fix: posts sorting on sidebar
Browse files Browse the repository at this point in the history
Fix wrong sorting when a user creates several posts
without the page reloading.
  • Loading branch information
dyudyunov committed May 13, 2024
1 parent d747478 commit 43ef4f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/discussions/posts/PostsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const PostsList = ({
if (isTopicTab) {
loadThreads(topicsIds, 1, true);
}
}, [filters]);
}, [filters, JSON.stringify(sortedPostsIds)]);

const postInstances = useMemo(() => (
sortedPostsIds?.map((postId, idx) => (
Expand Down

0 comments on commit 43ef4f4

Please sign in to comment.