import React from "react";
import { connect } from "react-redux";
import cx from "classnames";
import { toggleCompleted } from "../redux/actions";


const Task = ({ taskId, completed, assigned2, taskName, description, parentIds, status }) => (
  <li className="task-item" onClick={() => toggleCompleted(id)}>
   {"["} {completed ? true : false } {"]"}
    
    <span
      className={cx(
        "task-item__text",
        completed && "task-item__text--completed"
      )}
    >
    {taskId} {assigned2} {task} {description} {parentIds} {status}
    </span>
  </li>
);

export default connect(null, { toggleCompleted })(Task);

//      {(item.assigned2, item.task, item.description)}
