Skip to content

Commit

Permalink
adjust 'New feedbacks are not shown in reason popup when there are to…
Browse files Browse the repository at this point in the history
…o many feedbacks'
  • Loading branch information
marcussfu committed Jan 6, 2024
1 parent 53690ec commit 9ac65ea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions components/ArticleReplyFeedbackControl/ReasonsDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const LOAD_FEEDBACKS = gql`
) {
ListArticleReplyFeedbacks(
filter: { articleId: $articleId, replyId: $replyId, statuses: $statuses }
first: 100
first: 1000
) {
edges {
node {
Expand Down Expand Up @@ -124,7 +124,9 @@ function ReasonsDisplay({ articleReply, onSizeChange = () => {} }) {
</Tabs>
<Box display={tab === 0 ? 'block' : 'none'} className={classes.feedbacks}>
{feedbacks
.filter(({ vote }) => vote === 'UPVOTE')
.filter(
({ vote, comment }) => vote === 'UPVOTE' && (comment || '').trim()
)
.map(feedback => (
<Feedback
key={feedback.id}
Expand All @@ -136,7 +138,9 @@ function ReasonsDisplay({ articleReply, onSizeChange = () => {} }) {
</Box>
<Box display={tab === 1 ? 'block' : 'none'} className={classes.feedbacks}>
{feedbacks
.filter(({ vote }) => vote === 'DOWNVOTE')
.filter(
({ vote, comment }) => vote === 'DOWNVOTE' && (comment || '').trim()
)
.map(feedback => (
<Feedback
key={feedback.id}
Expand Down

0 comments on commit 9ac65ea

Please sign in to comment.