mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 04:38:50 -05:00
1be43911b4
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
40 lines
999 B
JavaScript
40 lines
999 B
JavaScript
import React from 'react'
|
|
import {
|
|
useProjectContext,
|
|
useShareProjectContext,
|
|
} from './share-project-modal'
|
|
import EditMember from './edit-member'
|
|
import LinkSharing from './link-sharing'
|
|
import Invite from './invite'
|
|
import SendInvites from './send-invites'
|
|
import ViewMember from './view-member'
|
|
import OwnerInfo from './owner-info'
|
|
import SendInvitesNotice from './send-invites-notice'
|
|
|
|
export default function ShareModalBody() {
|
|
const { isAdmin } = useShareProjectContext()
|
|
|
|
const project = useProjectContext()
|
|
|
|
return (
|
|
<>
|
|
{isAdmin && <LinkSharing />}
|
|
|
|
<OwnerInfo />
|
|
|
|
{project.members.map(member =>
|
|
isAdmin ? (
|
|
<EditMember key={member._id} member={member} />
|
|
) : (
|
|
<ViewMember key={member._id} member={member} />
|
|
)
|
|
)}
|
|
|
|
{project.invites.map(invite => (
|
|
<Invite key={invite._id} invite={invite} isAdmin={isAdmin} />
|
|
))}
|
|
|
|
{isAdmin ? <SendInvites /> : <SendInvitesNotice />}
|
|
</>
|
|
)
|
|
}
|