diff --git a/client/src/core/client/stream/tabs/Notifications/NotificationCommentContainer.tsx b/client/src/core/client/stream/tabs/Notifications/NotificationCommentContainer.tsx index b42105ded0..701d8636fa 100644 --- a/client/src/core/client/stream/tabs/Notifications/NotificationCommentContainer.tsx +++ b/client/src/core/client/stream/tabs/Notifications/NotificationCommentContainer.tsx @@ -7,16 +7,21 @@ import { GQLCOMMENT_STATUS } from "coral-framework/schema"; import HTMLContent from "coral-stream/common/HTMLContent"; import { Timestamp } from "coral-ui/components/v2"; -import { NotificationCommentContainer_comment } from "coral-stream/__generated__/NotificationCommentContainer_comment.graphql"; +import { + COMMENT_STATUS, + NotificationCommentContainer_comment, +} from "coral-stream/__generated__/NotificationCommentContainer_comment.graphql"; import styles from "./NotificationCommentContainer.css"; interface Props { comment: NotificationCommentContainer_comment; + status: COMMENT_STATUS; } const NotificationCommentContainer: FunctionComponent = ({ comment, + status, }) => { const [isOpen, setIsOpen] = useState(false); @@ -26,28 +31,28 @@ const NotificationCommentContainer: FunctionComponent = ({ return ( <> - {comment.status === GQLCOMMENT_STATUS.APPROVED && isOpen && ( + {status === GQLCOMMENT_STATUS.APPROVED && isOpen && ( )} - {comment.status === GQLCOMMENT_STATUS.APPROVED && !isOpen && ( + {status === GQLCOMMENT_STATUS.APPROVED && !isOpen && ( )} - {comment.status === GQLCOMMENT_STATUS.REJECTED && isOpen && ( + {status === GQLCOMMENT_STATUS.REJECTED && isOpen && ( )} - {comment.status === GQLCOMMENT_STATUS.REJECTED && !isOpen && ( + {status === GQLCOMMENT_STATUS.REJECTED && !isOpen && (