From f8b61281be84a6e4e7a44be5109e688a7c56c671 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 7 Jul 2017 21:18:33 +0200 Subject: refactor files so list updates while processing --- client/components/Tasks/Tasks.jsx | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'client/components/Tasks/Tasks.jsx') diff --git a/client/components/Tasks/Tasks.jsx b/client/components/Tasks/Tasks.jsx index 263e669..79ee0a1 100644 --- a/client/components/Tasks/Tasks.jsx +++ b/client/components/Tasks/Tasks.jsx @@ -2,31 +2,10 @@ import { h, Component } from 'preact' import { Link } from 'react-router-dom' import TaskForm from '../../containers/taskForm.js' - -import client from '../../client.js' +import TaskList from '../../containers/taskList.js' export default class Tasks extends Component { - constructor(props) { - super() - this.state = { - adding: false, - tasks: [], - } - client.task.index().then( tasks => this.setState({ tasks }) ) - } render() { -// {task.result_file.name} - const tasks = (this.state.tasks || []).map( (task, i) => { - return ( -
this.toggle(task)}> - {task.id} - {task.created_at} - {task.content_file.name} - {task.style_file.name} - {task.alpha} -
- ) - }) return (
@@ -39,9 +18,7 @@ export default class Tasks extends Component {
recent tasks
-
- {tasks} -
+
) -- cgit v1.2.3-70-g09d2