diff --git a/packages/cozy-sharing/src/index.jsx b/packages/cozy-sharing/src/index.jsx index f8fe814e87..5497cfbaa5 100644 --- a/packages/cozy-sharing/src/index.jsx +++ b/packages/cozy-sharing/src/index.jsx @@ -39,7 +39,6 @@ import EditableSharingModal from './components/EditableSharingModal' import { SharingDetailsModal } from './SharingDetailsModal' import { default as RecipientsList } from './components/WhoHasAccessLight' import { RecipientsAvatars, RecipientAvatar } from './components/Recipient' -import { default as DumbSharedStatus } from './components/SharedStatus' import { withClient } from 'cozy-client' import withLocales from './withLocales' @@ -389,17 +388,20 @@ export const SharedDocument = ({ docId, children }) => ( ) export const SharedStatus = withLocales( - ({ docId, className, noSharedClassName }) => ( + ({ docId, className, noSharedClassName, onClick, showMeAsOwner }) => ( - {({ byDocId, getRecipients, getSharingLink } = {}) => + {({ byDocId, getRecipients, getSharingLink, isOwner } = {}) => !byDocId || !byDocId[docId] ? ( ) : ( - ) } @@ -429,12 +431,13 @@ export const SharingOwnerAvatar = withLocales(({ docId, ...rest }) => ( export const SharedRecipients = withLocales(({ docId, onClick, ...rest }) => ( - {({ byDocId, getRecipients, getSharingLink } = {}) => + {({ byDocId, getRecipients, getSharingLink, isOwner } = {}) => !byDocId || !byDocId[docId] ? null : ( )