Converted a couple of components to flow-types

This commit is contained in:
Tom Moor
2017-04-27 22:18:46 -07:00
parent 4e5c3944d8
commit da8cf6f600
4 changed files with 25 additions and 27 deletions

View File

@ -1,27 +1,24 @@
// @flow
import React from 'react';
import type { Document } from '../../../types';
import DocumentPreview from 'components/DocumentPreview';
import Divider from 'components/Divider';
import styles from './DocumentList.scss';
class DocumentList extends React.Component {
static propTypes = {
documents: React.PropTypes.arrayOf(React.PropTypes.object),
props: {
documents: Array<Document>,
};
render() {
return (
<div>
{this.props.documents &&
this.props.documents.map(document => {
return (
<div>
<DocumentPreview document={document} />
<Divider />
</div>
);
})}
this.props.documents.map(document => (
<div>
<DocumentPreview document={document} />
<Divider />
</div>
))}
</div>
);
}