From f8b61281be84a6e4e7a44be5109e688a7c56c671 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Fri, 7 Jul 2017 21:18:33 +0200
Subject: refactor files so list updates while processing

---
 client/components/Tasks/TaskListView.jsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 client/components/Tasks/TaskListView.jsx

(limited to 'client/components/Tasks/TaskListView.jsx')

diff --git a/client/components/Tasks/TaskListView.jsx b/client/components/Tasks/TaskListView.jsx
new file mode 100644
index 0000000..dc1d9b4
--- /dev/null
+++ b/client/components/Tasks/TaskListView.jsx
@@ -0,0 +1,23 @@
+import { h, Component } from 'preact'
+
+import FileLink from '../../containers/fileLink.js'
+
+export default function TaskListView (props) {
+  const tasks = (props.tasks || []).map( (task, i) => {
+    return (
+      <div key={i}>
+        <span>{task.id}</span>
+        <span>{task.created_at}</span>
+        <span class='name'><FileLink file={task.content_file}>{task.content_file.name}</FileLink></span>
+        <span class='name'><FileLink file={task.style_file}>{task.style_file.name}</FileLink></span>
+        <span>{task.alpha}</span>
+      </div>
+    )
+        // <span class='name'>{task.result_file.name}</span>
+  })
+  return (
+    <div class='list'>
+      {tasks}
+    </div>
+  )
+}
-- 
cgit v1.2.3-70-g09d2

