Jayden Seric 3f33fb16d8 Support latest client and server alphas.
Also:

- Update deps.
- Lock `apollo-cache-inmemory` to v1.0.0 since newer versions are buggy.
- New file naming approach for stored uploads.
- More intuitive mixed ESM/CJS module imports in the API.
2017-11-20 00:40:10 +11:00

27 lines
644 B
JavaScript

import { graphql } from 'react-apollo'
import { Table, Head, Cell } from './table'
import uploadsQuery from '../queries/uploads'
const UploadList = ({ data: { uploads = [] } }) => (
<Table
thead={
<tr>
<Head>Filename</Head>
<Head>MIME type</Head>
<Head>Encoding</Head>
<Head>Path</Head>
</tr>
}
tbody={uploads.map(({ id, filename, mimetype, encoding, path }) => (
<tr key={id}>
<Cell>{filename}</Cell>
<Cell>{mimetype}</Cell>
<Cell>{encoding}</Cell>
<Cell>{path}</Cell>
</tr>
))}
/>
)
export default graphql(uploadsQuery)(UploadList)