diff --git a/plugins/talk-plugin-featured-comments/client/components/FeaturedComment.js b/plugins/talk-plugin-featured-comments/client/components/FeaturedComment.js index f28d01b6d..702d7c4dc 100644 --- a/plugins/talk-plugin-featured-comments/client/components/FeaturedComment.js +++ b/plugins/talk-plugin-featured-comments/client/components/FeaturedComment.js @@ -6,44 +6,52 @@ import {timeago} from 'coral-framework/services/i18n'; import {Slot} from 'plugin-api/beta/client/components'; import {Icon} from 'plugin-api/beta/client/components/ui'; -const FeaturedComment = ({comment, asset, viewComment}) => { - return ( -
+class FeaturedComment extends React.Component { -
- {comment.body} -
+ viewComment = () => { + this.props.viewComment(this.props.comment.id); + } -
- - {comment.user.username} - - - ,{' '}{timeago(comment.created_at)} - + render() { + const {comment, asset} = this.props; + return ( +
+ +
+ {comment.body} +
+ +
+ + {comment.user.username} + + + ,{' '}{timeago(comment.created_at)} + +
+ +
- - -
- ); -}; + ); + } +} export default FeaturedComment;