|
@@ -2,18 +2,23 @@ import React from 'react';
|
|
import { DialogContent } from '@mui/material';
|
|
import { DialogContent } from '@mui/material';
|
|
import { FlexWrapper } from 'components/Container';
|
|
import { FlexWrapper } from 'components/Container';
|
|
import AllCollectionCard from './CollectionCard';
|
|
import AllCollectionCard from './CollectionCard';
|
|
|
|
+import { CollectionSummary } from 'types/collection';
|
|
|
|
|
|
|
|
+interface Iprops {
|
|
|
|
+ collectionSummaries: CollectionSummary[];
|
|
|
|
+ onCollectionClick: (id?: number) => void;
|
|
|
|
+}
|
|
export default function AllCollectionContent({
|
|
export default function AllCollectionContent({
|
|
- sortedCollectionSummaries,
|
|
|
|
|
|
+ collectionSummaries,
|
|
onCollectionClick,
|
|
onCollectionClick,
|
|
-}) {
|
|
|
|
|
|
+}: Iprops) {
|
|
return (
|
|
return (
|
|
<DialogContent>
|
|
<DialogContent>
|
|
<FlexWrapper
|
|
<FlexWrapper
|
|
style={{
|
|
style={{
|
|
flexWrap: 'wrap',
|
|
flexWrap: 'wrap',
|
|
}}>
|
|
}}>
|
|
- {sortedCollectionSummaries.map(
|
|
|
|
|
|
+ {collectionSummaries.map(
|
|
({ latestFile, collectionAttributes, fileCount }) => (
|
|
({ latestFile, collectionAttributes, fileCount }) => (
|
|
<AllCollectionCard
|
|
<AllCollectionCard
|
|
onCollectionClick={onCollectionClick}
|
|
onCollectionClick={onCollectionClick}
|