mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 09:07:40 -05:00
1be43911b4
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
33 lines
810 B
JavaScript
33 lines
810 B
JavaScript
import React from 'react'
|
|
import { Col, Row } from 'react-bootstrap'
|
|
import PropTypes from 'prop-types'
|
|
import { Trans } from 'react-i18next'
|
|
import { useProjectContext } from './share-project-modal'
|
|
|
|
export default function SendInvitesNotice() {
|
|
const project = useProjectContext()
|
|
|
|
return (
|
|
<Row className="public-access-level public-access-level--notice">
|
|
<Col xs={12} className="text-center">
|
|
<AccessLevel level={project.publicAccesLevel} />
|
|
</Col>
|
|
</Row>
|
|
)
|
|
}
|
|
|
|
function AccessLevel({ level }) {
|
|
switch (level) {
|
|
case 'private':
|
|
return <Trans i18nKey="to_add_more_collaborators" />
|
|
|
|
case 'tokenBased':
|
|
return <Trans i18nKey="to_change_access_permissions" />
|
|
|
|
default:
|
|
return null
|
|
}
|
|
}
|
|
AccessLevel.propTypes = {
|
|
level: PropTypes.string,
|
|
}
|