Fix new document creation. Add collection name to DocumentPreview in search results

This commit is contained in:
Tom Moor
2017-07-14 22:15:56 -07:00
parent 2fea9fafd0
commit 2a9efaba8f
5 changed files with 15 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import PublishingInfo from 'components/PublishingInfo';
type Props = {
document: Document,
highlight?: ?string,
showCollection?: boolean,
innerRef?: Function,
};
@ -43,7 +44,7 @@ class DocumentPreview extends Component {
props: Props;
render() {
const { document, innerRef, ...rest } = this.props;
const { document, showCollection, innerRef, ...rest } = this.props;
return (
<DocumentLink to={document.url} innerRef={innerRef} {...rest}>
@ -53,6 +54,7 @@ class DocumentPreview extends Component {
createdBy={document.createdBy}
updatedAt={document.updatedAt}
updatedBy={document.updatedBy}
collection={showCollection ? document.collection : undefined}
/>
</DocumentLink>
);