@@ -14,9 +14,11 @@ import { PageNotFound } from '../page-not-found/PageNotFound'
1414import { CreatedAlert } from './CreatedAlert'
1515import { PublishCollectionButton } from './publish-collection/PublishCollectionButton'
1616import { ShareCollectionButton } from './share-collection-button/ShareCollectionButton'
17+ import { ContactButton } from '@/sections/shared/contact/ContactButton'
1718import { EditCollectionDropdown } from './edit-collection-dropdown/EditCollectionDropdown'
1819import { FeaturedItems } from './featured-items/FeaturedItems'
1920import styles from './Collection.module.scss'
21+ import { ContactRepository } from '@/contact/domain/repositories/ContactRepository'
2022
2123interface CollectionProps {
2224 collectionRepository : CollectionRepository
@@ -26,6 +28,7 @@ interface CollectionProps {
2628 edited ?: boolean
2729 collectionQueryParams : UseCollectionQueryParamsReturnType
2830 infiniteScrollEnabled ?: boolean
31+ contactRepository : ContactRepository
2932}
3033
3134export function Collection ( {
@@ -34,7 +37,8 @@ export function Collection({
3437 created,
3538 published,
3639 edited,
37- collectionQueryParams
40+ collectionQueryParams,
41+ contactRepository
3842} : CollectionProps ) {
3943 useScrollTop ( )
4044 const { t } = useTranslation ( 'collection' )
@@ -47,7 +51,6 @@ export function Collection({
4751 collectionIdOrAlias : collectionIdFromParams ,
4852 collectionRepository
4953 } )
50-
5154 const canUserAddCollection = Boolean ( collectionUserPermissions ?. canAddCollection )
5255 const canUserEditCollection = Boolean ( collectionUserPermissions ?. canEditCollection )
5356 const canUserAddDataset = Boolean ( collectionUserPermissions ?. canAddDataset )
@@ -94,8 +97,12 @@ export function Collection({
9497 < div className = { styles [ 'metrics-actions-container' ] } >
9598 < div className = { styles . metrics } > </ div >
9699 < div className = { styles [ 'right-content' ] } >
97- { /* 👇 Here should go Contact button also */ }
98- { /* <ContactButton /> */ }
100+ < ContactButton
101+ toContactName = { collection . name }
102+ contactObjectType = "collection"
103+ id = { collection . id }
104+ contactRepository = { contactRepository }
105+ />
99106
100107 < ShareCollectionButton />
101108
0 commit comments