overleaf/services/web/frontend/js/features/share-project-modal/components/share-modal-body.js
June Kelly b770feadc8 Merge pull request #4743 from overleaf/hb-recaptcha-branding
add recaptcha branding on login, registration, pw reset and share modal

GitOrigin-RevId: dcdf3e7987a25712601aed2426cce2467eaecea3
2021-08-20 08:03:05 +00:00

41 lines
1.2 KiB
JavaScript

import { 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'
import { useProjectContext } from '../../../shared/context/project-context'
import RecaptchaConditions from '../../../shared/components/recaptcha-conditions'
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 />}
{!window.ExposedSettings.recaptchaDisabled?.invite && (
<RecaptchaConditions />
)}
</>
)
}