fix: use threads api in case of search (#419)

* fix: use threads api in case of search
This commit is contained in:
Ahtisham Shahid
2023-02-01 14:17:43 +05:00
committed by GitHub
parent 62ebd4450f
commit bafb55afa9

View File

@@ -50,8 +50,7 @@ function PostsList({
topicIds,
isFilterChanged,
};
if (showOwnPosts) {
if (showOwnPosts && filters.search === '') {
dispatch(fetchUserPosts(courseId, params));
} else {
dispatch(fetchThreads(courseId, params));