mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 23:15:57 -05:00
21 lines
416 B
React
21 lines
416 B
React
|
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,
|
||
|
}
|