Skip to content

Commit 7f3e838

Browse files
committed
fix: posts sorting on sidebar
Fix wrong sorting when a user creates several posts without the page reloading.
1 parent 4914f51 commit 7f3e838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/discussions/posts/PostsList.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const PostsList = ({
6161
if (topicsIds !== undefined && configStatus === RequestStatus.SUCCESSFUL) {
6262
loadThreads(topicsIds);
6363
}
64-
}, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus]);
64+
}, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus, JSON.stringify(sortedPostsIds)]);
6565

6666
useEffect(() => {
6767
if (isTopicTab) {

0 commit comments

Comments
 (0)