List.tsx

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