diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 8563fe5e5..257c076b1 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -10,6 +10,7 @@ import React, {PropTypes} from 'react'; import PermalinkButton from 'coral-plugin-permalinks/PermalinkButton'; import AuthorName from 'coral-plugin-author-name/AuthorName'; + import TagLabel from 'coral-plugin-tag-label/TagLabel'; import Content from 'coral-plugin-commentcontent/CommentContent'; import PubDate from 'coral-plugin-pubdate/PubDate'; @@ -55,6 +56,11 @@ class Comment extends React.Component { actions: PropTypes.array.isRequired, body: PropTypes.string.isRequired, id: PropTypes.string.isRequired, + tags: PropTypes.arrayOf( + PropTypes.shape({ + name: PropTypes.string + }) + ), replies: PropTypes.arrayOf( PropTypes.shape({ body: PropTypes.string.isRequired, @@ -95,8 +101,7 @@ class Comment extends React.Component {
- +
diff --git a/client/coral-framework/graphql/queries/index.js b/client/coral-framework/graphql/queries/index.js index 7ce065baa..01c707e8d 100644 --- a/client/coral-framework/graphql/queries/index.js +++ b/client/coral-framework/graphql/queries/index.js @@ -13,7 +13,7 @@ function getQueryVariable(variable) { } // If no query is included, return a default string for development - return 'http://dev.default.stream'; + return 'http://localhost:3030'; } export const queryStream = graphql(STREAM_QUERY, { diff --git a/client/coral-plugin-stream/Stream.js b/client/coral-plugin-stream/Stream.js index 633a98502..c62ef7081 100644 --- a/client/coral-plugin-stream/Stream.js +++ b/client/coral-plugin-stream/Stream.js @@ -58,6 +58,9 @@ const StreamQuery = gql`fragment commentView on Comment { user { name: displayName } + tags { + name + } actions { type: action_type count diff --git a/client/coral-plugin-tag-label/TagLabel.js b/client/coral-plugin-tag-label/TagLabel.js index ee5b22f23..dcfee8bf1 100644 --- a/client/coral-plugin-tag-label/TagLabel.js +++ b/client/coral-plugin-tag-label/TagLabel.js @@ -1,18 +1,8 @@ -import React, {Component} from 'react'; -const packagename = 'coral-plugin-tag-label'; -import styles from './styles.css'; +import React from 'react'; +const name = 'coral-plugin-tag-label'; -export default class TagLabel extends Component { +const TagLabel = () =>
+ oh yeah +
; - render () { - const {tags} = this.props; - console.log('DEBUG ', tags); - return ( -
- {tags} -
- ); - } -} +export default TagLabel; diff --git a/models/comment.js b/models/comment.js index b6848d0bc..ac44d904e 100644 --- a/models/comment.js +++ b/models/comment.js @@ -9,11 +9,6 @@ const STATUSES = [ null ]; -const TAGS = [ - 'STAFF', - null -]; - /** * The Mongo schema for a Comment Status. * @type {Schema} @@ -40,10 +35,7 @@ const StatusSchema = new Schema({ * @type {Schema} */ const TagSchema = new Schema({ - name: { - type: String, - enum: TAGS, - }, + name: String, // The User ID of the user that assigned the status. assigned_by: {