Merge pull request #6311 from JoelGritter/patch-1

fix(gh-5989): adjust comment load batch size
This commit is contained in:
Karishma Chadha 2021-12-22 13:25:00 -05:00 committed by GitHub
commit d737196b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ const api = require('../lib/api');
const log = require('../lib/log');
const COMMENT_LIMIT = 20;
const REPLY_LIMIT = 25;
const {
addNewComment,
@ -44,7 +45,7 @@ const getReplies = (commentIds, offset) => ((dispatch, getState) => {
api({
uri: `${isAdmin ? '/admin' : ''}/studios/${studioId}/comments/${parentId}/replies`,
authentication: token ? token : null,
params: {offset: offset || 0, limit: COMMENT_LIMIT}
params: {offset: offset || 0, limit: REPLY_LIMIT}
}, (err, body, res) => {
if (err) {
return callback(`Error fetching comment replies: ${err}`);