mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 23:36:00 -05:00
7755203ff7
GitOrigin-RevId: d11b3f587b462d400a8d68128dc8be342415bf7d
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,
|
|
}
|