overleaf/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/send-invites.jsx
Thomas 3b29865d87 Merge pull request #19194 from overleaf/rh-read-only-invite-limit
[web] Allow read-only invite when over collaborator limit

GitOrigin-RevId: 96783910b63aca3f282d7c26a412b56336246c64
2024-07-02 08:04:31 +00:00

25 lines
781 B
JavaScript

import { Row } from 'react-bootstrap'
import AddCollaborators from './add-collaborators'
import AddCollaboratorsUpgrade from './add-collaborators-upgrade'
import CollaboratorsLimitUpgrade from './collaborators-limit-upgrade'
import PropTypes from 'prop-types'
export default function SendInvites({
canAddCollaborators,
hasExceededCollaboratorLimit,
}) {
return (
<Row className="invite-controls">
{hasExceededCollaboratorLimit && <AddCollaboratorsUpgrade />}
{!canAddCollaborators && !hasExceededCollaboratorLimit && (
<CollaboratorsLimitUpgrade />
)}
<AddCollaborators readOnly={!canAddCollaborators} />
</Row>
)
}
SendInvites.propTypes = {
canAddCollaborators: PropTypes.bool,
hasExceededCollaboratorLimit: PropTypes.bool,
}