diff --git a/pkg/interface/publish/src/js/components/lib/comments.js b/pkg/interface/publish/src/js/components/lib/comments.js index 14fc1370c..b7a19fc7c 100644 --- a/pkg/interface/publish/src/js/components/lib/comments.js +++ b/pkg/interface/publish/src/js/components/lib/comments.js @@ -1,7 +1,6 @@ import React, { Component } from 'react' import { CommentItem } from './comment-item'; -//TODO map comments into comment-items; export class Comments extends Component { constructor(props){ super(props); @@ -20,6 +19,8 @@ export class Comments extends Component { body: this.state.commentBody } }; + + this.textArea.value = ''; window.api.action("publish", "publish-action", comment); } @@ -37,15 +38,28 @@ export class Comments extends Component { ); }) + let disableComment = this.state.commentBody === ''; + let commentClass = (disableComment) + ? "f9 pa2 bg-white br1 ba b--gray2 gray2" + : "f9 pa2 bg-white br1 ba b--gray2 black pointer"; + return (