List.tsx
1import Table from '@material-ui/core/Table/Table';
2import TableBody from '@material-ui/core/TableBody/TableBody';
3import React from 'react';
4import BugRow from './BugRow';
5import { BugListFragment } from './ListQuery.generated';
6
7type Props = { bugs: BugListFragment };
8function List({ bugs }: Props) {
9 return (
10 <Table>
11 <TableBody>
12 {bugs.edges.map(({ cursor, node }) => (
13 <BugRow bug={node} key={cursor} />
14 ))}
15 </TableBody>
16 </Table>
17 );
18}
19
20export default List;