diff options
author | Quentin Gliech <quentingliech@gmail.com> | 2020-02-04 20:57:43 +0100 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2020-02-11 20:54:37 +0100 |
commit | 6a502c145bd8f2e2e1a9c0b103c11f0433c60737 (patch) | |
tree | 72c3a23aa6c5df8013d53523fa4125a3e28063a8 /webui/src/list/List.tsx | |
parent | 9c570cac725fe7048ddd1d181b33b8fa1808e401 (diff) | |
download | git-bug-6a502c145bd8f2e2e1a9c0b103c11f0433c60737.tar.gz |
webui: convert bug list to typescript
Diffstat (limited to 'webui/src/list/List.tsx')
-rw-r--r-- | webui/src/list/List.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webui/src/list/List.tsx b/webui/src/list/List.tsx new file mode 100644 index 00000000..23b193d4 --- /dev/null +++ b/webui/src/list/List.tsx @@ -0,0 +1,20 @@ +import Table from '@material-ui/core/Table/Table'; +import TableBody from '@material-ui/core/TableBody/TableBody'; +import React from 'react'; +import BugRow from './BugRow'; +import { BugListFragment } from './ListQuery.generated'; + +type Props = { bugs: BugListFragment }; +function List({ bugs }: Props) { + return ( + <Table> + <TableBody> + {bugs.edges.map(({ cursor, node }) => ( + <BugRow bug={node} key={cursor} /> + ))} + </TableBody> + </Table> + ); +} + +export default List; |