diff --git a/src/editor/widgets/comment/Comment.jsx b/src/editor/widgets/comment/Comment.jsx index 5a27b7c..263b614 100644 --- a/src/editor/widgets/comment/Comment.jsx +++ b/src/editor/widgets/comment/Comment.jsx @@ -27,12 +27,20 @@ const Comment = props => { props.onUpdate(props.body, { ...props.body, value: evt.target.value }); } + const creatorInfo = props.body.creator && +
+ {props.body.creator.name} + { props.body.created && + + + + } +
+ return props.readOnly ? (
{props.body.value}
-
-
{props.body.creator?.name}
-
+ { creatorInfo }
) : (
@@ -43,16 +51,7 @@ const Comment = props => { onSaveAndClose={props.onSaveAndClose} /> - { props.body.creator && -
- {props.body.creator.name} - { props.body.created && - - - - } -
- } + { creatorInfo }
{ return (
-
    - { tagBodies.map(tag => -
  • - {tag.value} + { tagBodies.length > 0 && +
      + { tagBodies.map(tag => +
    • + {tag.value} - {!props.readOnly && - - - - + {!props.readOnly && + + + + + - - - } -
    • - )} -
    + + } +
  • + )} +
+ } { !props.readOnly &&