Browse Source

Step 9.8: Update Task component to show username.

Frederic G. MARAND 8 years ago
parent
commit
cefd2c6b19
1 changed files with 7 additions and 2 deletions
  1. 7 2
      Task.jsx

+ 7 - 2
Task.jsx

@@ -29,9 +29,14 @@ Task = React.createClass({
           ×
           </button>
 
-        <input type="checkbox" readOnly="{true}" checked={this.props.task.checked} onClick={this.toggleChecked} />
+        <input
+          type="checkbox"
+          readOnly="{true}"
+          checked={this.props.task.checked}
+          onClick={this.toggleChecked}
+        />
 
-        <span className="text">{this.props.task.text}</span>
+        <strong>{this.props.task.username}</strong>: <span className="text">{this.props.task.text}</span>
       </li>
     );
     return result;