mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-15 02:30:58 -05:00
64d9792fe3
[web]: Handle exceeded editor limit in share modal GitOrigin-RevId: 23a15805ca98327ae4a7fc731bbca3982c90bad5
20 lines
416 B
JavaScript
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,
|
|
}
|