Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
make verify-locales pass
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Dec 11, 2019
1 parent c7656ee commit d59e4fd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions ui/app/pages/settings/permissions-tab/permissions-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ export default class PermissionsTab extends Component {
t: PropTypes.func,
}

renderClearButton (messageKey, clickHandler, isDisabled) {
const { t } = this.context
renderClearButton (mainMessage, descriptionMessage, clickHandler, isDisabled) {
return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{ t(messageKey) }</span>
<span>{ mainMessage }</span>
<span className="settings-page__content-description">
{ t(`${messageKey}Description`) }
{ descriptionMessage }
</span>
</div>
<div className="settings-page__content-item">
Expand All @@ -46,7 +45,7 @@ export default class PermissionsTab extends Component {
clickHandler()
}}
>
{ t(messageKey) }
{ mainMessage }
</Button>
</div>
</div>
Expand All @@ -55,6 +54,7 @@ export default class PermissionsTab extends Component {
}

render () {
const { t } = this.context
const { warning } = this.props
const hasPermissions = Object.keys(this.props.permissions).length > 0
const hasPermissionsActivity = this.props.permissionsLog.length > 0
Expand All @@ -71,7 +71,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
'clearPermissions',
t('clearPermissions'),
t('clearPermissionsDescription'),
this.props.showClearPermissionsModal,
!hasPermissions
)
Expand All @@ -81,7 +82,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
'clearPermissionsHistory',
t('clearPermissionsHistory'),
t('clearPermissionsHistoryDescription'),
this.props.showClearPermissionsHistoryModal,
!hasPermissionsHistory
)
Expand All @@ -91,7 +93,8 @@ export default class PermissionsTab extends Component {
/>
{
this.renderClearButton(
'clearPermissionsActivity',
t('clearPermissionsActivity'),
t('clearPermissionsActivityDescription'),
this.props.showClearPermissionsActivityModal,
!hasPermissionsActivity
)
Expand Down

0 comments on commit d59e4fd

Please sign in to comment.