overleaf/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/member-privileges.jsx
roo hutton 64d9792fe3 Merge pull request #18861 from overleaf/rh-editor-limit-exceeded
[web]: Handle exceeded editor limit in share modal

GitOrigin-RevId: 23a15805ca98327ae4a7fc731bbca3982c90bad5
2024-06-25 08:04:46 +00:00

20 lines
416 B
JavaScript

import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
export default function MemberPrivileges({ privileges }) {
const { t } = useTranslation()
switch (privileges) {
case 'readAndWrite':
return t('can_edit')
case 'readOnly':
return t('read_only')
default:
return null
}
}
MemberPrivileges.propTypes = {
privileges: PropTypes.string.isRequired,
}