-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
45 lines (41 loc) · 1.24 KB
/
index.jsx
File metadata and controls
45 lines (41 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React, { PropTypes } from 'react';
import { Table } from 'react-bootstrap';
import { Link } from 'react-router';
import { observer } from 'mobx-react';
export const TaskTable = observer(['taskList'], ({ taskList: { tasks }, projectId }) => {
console.log('render table');
return (
<Table>
<thead>
<tr>
<th>Title</th>
<th>Status</th>
<th>Assignee</th>
<th>Version</th>
</tr>
</thead>
<tbody>
{tasks.map(task => (
<tr key={task.id}>
<td>
<Link to={`/projects/${projectId}/tasks/${task.id}`}>{task.title}</Link>
</td>
<td>
{task.status}
</td>
<td>
{task.assigneeName}
</td>
<td>
{task.version}
</td>
</tr>
))}
</tbody>
</Table>
);
});
TaskTable.propTypes = {
tasks: PropTypes.array,
projectId: PropTypes.string,
};