Added: Recently published view to collection

Added: Infinite scroll to collection
This commit is contained in:
Tom Moor
2019-01-07 23:14:43 -08:00
parent 74515e0b19
commit e6e89dc243
10 changed files with 87 additions and 25 deletions

View File

@@ -7,12 +7,14 @@ import ArrowKeyNavigation from 'boundless-arrow-key-navigation';
type Props = {
documents: Document[],
showCollection?: boolean,
showPublished?: boolean,
limit?: number,
};
export default function DocumentList({
limit,
showCollection,
showPublished,
documents,
}: Props) {
const items = limit ? documents.splice(0, limit) : documents;
@@ -27,6 +29,7 @@ export default function DocumentList({
key={document.id}
document={document}
showCollection={showCollection}
showPublished={showPublished}
/>
))}
</ArrowKeyNavigation>