mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
9daa8f5d98
[web] rename all the JSX files to .jsx/.tsx GitOrigin-RevId: 82056ae47e017523722cf258dcc83c8a925a28f7
32 lines
809 B
JavaScript
32 lines
809 B
JavaScript
import { Col, Row } from 'react-bootstrap'
|
|
import PropTypes from 'prop-types'
|
|
import { Trans } from 'react-i18next'
|
|
import { useProjectContext } from '../../../shared/context/project-context'
|
|
|
|
export default function SendInvitesNotice() {
|
|
const { publicAccessLevel } = useProjectContext()
|
|
|
|
return (
|
|
<Row className="public-access-level public-access-level--notice">
|
|
<Col xs={12} className="text-center">
|
|
<AccessLevel level={publicAccessLevel} />
|
|
</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,
|
|
}
|