From 9ac65ea69ad6965570d7a7fc60215f8bb376e8c9 Mon Sep 17 00:00:00 2001 From: marcusfu Date: Sat, 6 Jan 2024 16:00:34 +0800 Subject: [PATCH] adjust 'New feedbacks are not shown in reason popup when there are too many feedbacks' --- .../ArticleReplyFeedbackControl/ReasonsDisplay.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/ArticleReplyFeedbackControl/ReasonsDisplay.js b/components/ArticleReplyFeedbackControl/ReasonsDisplay.js index 60dcafd7..044d3cd3 100644 --- a/components/ArticleReplyFeedbackControl/ReasonsDisplay.js +++ b/components/ArticleReplyFeedbackControl/ReasonsDisplay.js @@ -46,7 +46,7 @@ export const LOAD_FEEDBACKS = gql` ) { ListArticleReplyFeedbacks( filter: { articleId: $articleId, replyId: $replyId, statuses: $statuses } - first: 100 + first: 1000 ) { edges { node { @@ -124,7 +124,9 @@ function ReasonsDisplay({ articleReply, onSizeChange = () => {} }) { {feedbacks - .filter(({ vote }) => vote === 'UPVOTE') + .filter( + ({ vote, comment }) => vote === 'UPVOTE' && (comment || '').trim() + ) .map(feedback => ( {} }) { {feedbacks - .filter(({ vote }) => vote === 'DOWNVOTE') + .filter( + ({ vote, comment }) => vote === 'DOWNVOTE' && (comment || '').trim() + ) .map(feedback => (