import * as React from "react"; import { useTranslation } from "react-i18next"; import Document from "~/models/Document"; import DocumentListItem from "~/components/DocumentListItem"; import PaginatedList from "~/components/PaginatedList"; type Props = { documents: Document[]; fetch: (options: any) => Promise; options?: Record; heading?: React.ReactNode; empty?: React.ReactNode; showParentDocuments?: boolean; showCollection?: boolean; showPublished?: boolean; showDraft?: boolean; showTemplate?: boolean; }; const PaginatedDocumentList = React.memo(function PaginatedDocumentList({ empty, heading, documents, fetch, options, showParentDocuments, showCollection, showPublished, showTemplate, showDraft, ...rest }: Props) { const { t } = useTranslation(); return ( ( )} {...rest} /> ); }); export default PaginatedDocumentList;