Skip to content

Commit

Permalink
fix(NoticeComment): update archived article comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wlliaml committed Sep 3, 2024
1 parent 6cd299f commit 481bc2a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/Notice/NoticeComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const fragments = {
id
title
slug
articleState: state
shortHash
author {
id
Expand All @@ -31,7 +32,7 @@ const fragments = {
}
... on Moment {
id
state
momentState: state
shortHash
}
}
Expand Down Expand Up @@ -67,8 +68,6 @@ const NoticeComment = ({
return null
}

console.log({ comment })

if (
comment.state === 'banned' &&
((comment.parentComment === null && comment.comments?.totalCount === 0) ||
Expand Down Expand Up @@ -124,7 +123,11 @@ const NoticeComment = ({
)
}

if (comment.state === 'active' && moment && moment.state === 'archived') {
if (
comment.state === 'active' &&
((moment && moment.momentState === 'archived') ||
(article && article.articleState === 'archived'))
) {
return (
<section>
<NoticeContentDigest content={comment.content || ''} color="grey" />
Expand Down

0 comments on commit 481bc2a

Please sign in to comment.