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 Apr 8, 2024
1 parent d7fcc86 commit ae6e989
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 ae6e989

Please sign in to comment.