Converted a couple of components to flow-types
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user