|
@@ -34,9 +34,17 @@ App = React.createClass({
|
|
|
},
|
|
|
|
|
|
renderTasks() {
|
|
|
+ // Get tasks from this.data.tasks.
|
|
|
return this.data.tasks.map((task) => {
|
|
|
+ const currentUserId = this.data.currentUser && this.data.currentUser._id;
|
|
|
+ const showPrivateButton = task.owner === currentUserId;
|
|
|
+
|
|
|
// Meteor._debug(task._id);
|
|
|
- return <Task key={task._id} task={task} />;
|
|
|
+ return <Task
|
|
|
+ key={task._id}
|
|
|
+ task={task}
|
|
|
+ showPrivateButton={showPrivateButton}
|
|
|
+ />;
|
|
|
});
|
|
|
},
|
|
|
|