feat: Add pagination to posts' comments
This change adds pagination to posts' comments. When viewing a post, if there are more than one page of comments, initially users will only see the first page of the comments, and can load more comments by clicking "load more comments" button. This change only affects comments to posts. For comments that are responses to other comments the pagination has not been implemented.
This commit is contained in:
@@ -80,6 +80,7 @@ export function fetchThreadComments(threadId, { page = 1 } = {}) {
|
||||
dispatch(fetchCommentsSuccess({
|
||||
...normaliseComments(camelCaseObject(data)),
|
||||
page,
|
||||
threadId,
|
||||
}));
|
||||
} catch (error) {
|
||||
if (getHttpErrorStatus(error) === 403) {
|
||||
|
||||
Reference in New Issue
Block a user