Global error messages (#261)

* Remove global error rendering

* Added basic Toasts

* Auto-close toasts

* 💚

* Flow fix, more reliable CI
This commit is contained in:
Tom Moor
2017-09-23 18:58:34 -04:00
committed by GitHub
parent aa38510abc
commit 53c0c9180b
9 changed files with 136 additions and 22 deletions

View File

@@ -159,17 +159,17 @@ const StyledArrowKeyNavigation = styled(ArrowKeyNavigation)`
>
{this.resultIds.map((documentId, index) => {
const document = documents.getById(documentId);
if (document)
return (
<DocumentPreview
innerRef={ref =>
index === 0 && this.setFirstDocumentRef(ref)}
key={documentId}
document={document}
highlight={this.searchTerm}
showCollection
/>
);
if (!document) return null;
return (
<DocumentPreview
innerRef={ref =>
index === 0 && this.setFirstDocumentRef(ref)}
key={documentId}
document={document}
highlight={this.searchTerm}
showCollection
/>
);
})}
</StyledArrowKeyNavigation>
</ResultList>