diff --git a/apps/photos/src/components/Collections/CollectionShare/ShareControl/CollaboratorParticipants.tsx b/apps/photos/src/components/Collections/CollectionShare/ShareControl/CollaboratorParticipants.tsx index 2c71b1fce..e3e1c6b16 100644 --- a/apps/photos/src/components/Collections/CollectionShare/ShareControl/CollaboratorParticipants.tsx +++ b/apps/photos/src/components/Collections/CollectionShare/ShareControl/CollaboratorParticipants.tsx @@ -9,24 +9,18 @@ import { EnteMenuItem } from 'components/Menu/EnteMenuItem'; // import AvatarCollectionShare from '../AvatarCollectionShare'; // import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import MenuItemDivider from 'components/Menu/MenuItemDivider'; +import ManageAddCollab from './MangeAddCollab'; interface Iprops { collection: Collection; + onRootClose: () => void; } -export function CollaboratorParticipants({ collection }: Iprops) { +export function CollaboratorParticipants({ collection, onRootClose }: Iprops) { if (!collection.sharees?.length) { return <>; } - const shareExpireOption = [ - 'Never', - '1 day', - '1 week', - '1 month', - '1 year', - 'Custom', - ]; const [collaborators, setCollaborators] = useState([]); useEffect(() => { @@ -51,11 +45,15 @@ export function CollaboratorParticipants({ collection }: Iprops) { onClick={() => console.log('clicked')} label={item} /> - {index !== shareExpireOption.length - 1 && ( + {index !== collaborators.length - 1 && ( )} ))} + ); diff --git a/apps/photos/src/components/Collections/CollectionShare/ShareControl/ManageParticipantsList.tsx b/apps/photos/src/components/Collections/CollectionShare/ShareControl/ManageParticipantsList.tsx index f523ec1cc..8036bd227 100644 --- a/apps/photos/src/components/Collections/CollectionShare/ShareControl/ManageParticipantsList.tsx +++ b/apps/photos/src/components/Collections/CollectionShare/ShareControl/ManageParticipantsList.tsx @@ -9,9 +9,10 @@ import { CollaboratorParticipants } from './CollaboratorParticipants'; interface Iprops { collection: Collection; + onRootClose: () => void; } -export function ManageParticipantsList({ collection }: Iprops) { +export function ManageParticipantsList({ collection, onRootClose }: Iprops) { if (!collection.sharees?.length) { return <>; } @@ -20,8 +21,11 @@ export function ManageParticipantsList({ collection }: Iprops) { - + collection={collection} + onRootClose={onRootClose}> + ); } diff --git a/apps/photos/src/components/Collections/CollectionShare/ShareControl/MangeAddCollab.tsx b/apps/photos/src/components/Collections/CollectionShare/ShareControl/MangeAddCollab.tsx index f12c6f861..e85b31092 100644 --- a/apps/photos/src/components/Collections/CollectionShare/ShareControl/MangeAddCollab.tsx +++ b/apps/photos/src/components/Collections/CollectionShare/ShareControl/MangeAddCollab.tsx @@ -28,7 +28,7 @@ export default function ManageAddCollab({ collection, onRootClose }: Iprops) { } onClick={openManageShare} - label={t('Add Collaborator')} + label={t('Add Collaborators')} /> diff --git a/apps/photos/src/components/Collections/CollectionShare/ShareControl/ViewerParticipants.tsx b/apps/photos/src/components/Collections/CollectionShare/ShareControl/ViewerParticipants.tsx index 579a2aec1..5ffcc4dfc 100644 --- a/apps/photos/src/components/Collections/CollectionShare/ShareControl/ViewerParticipants.tsx +++ b/apps/photos/src/components/Collections/CollectionShare/ShareControl/ViewerParticipants.tsx @@ -7,12 +7,14 @@ import { EnteMenuItem } from 'components/Menu/EnteMenuItem'; import MenuItemDivider from 'components/Menu/MenuItemDivider'; import MenuSectionTitle from 'components/Menu/MenuSectionTitle'; import AvatarCollectionShare from '../AvatarCollectionShare'; +import ManageAddViewer from './ManageAddViewer'; interface Iprops { collection: Collection; + onRootClose: () => void; } -export function ViewerParticipants({ collection }: Iprops) { +export function ViewerParticipants({ collection, onRootClose }: Iprops) { if (!collection.sharees?.length) { return <>; } @@ -30,18 +32,28 @@ export function ViewerParticipants({ collection }: Iprops) { - {Viewers.map((item, index) => ( - <> - console.log('clicked')} - label={item} - startIcon={} - /> - {index !== Viewers.length - 1 && } - - ))} + <> + {Viewers.map((item, index) => ( + <> + console.log('clicked')} + label={item} + startIcon={ + + } + /> + {index !== Viewers.length - 1 && ( + + )} + + ))} + + );