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 Mar 29, 2024
1 parent 4914f51 commit 7f3e838
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 @@ -61,7 +61,7 @@ const PostsList = ({
if (topicsIds !== undefined && configStatus === RequestStatus.SUCCESSFUL) {
loadThreads(topicsIds);
}
}, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus]);
}, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus, JSON.stringify(sortedPostsIds)]);

useEffect(() => {
if (isTopicTab) {
Expand Down

0 comments on commit 7f3e838

Please sign in to comment.