2020-07-15 10:13:28 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { Dialog } from '../../../base/dialog';
|
|
|
|
import { translate } from '../../../base/i18n';
|
|
|
|
import { connect } from '../../../base/redux';
|
|
|
|
import AbstractGrantModeratorDialog
|
2021-09-10 11:05:16 +00:00
|
|
|
, { abstractMapStateToProps } from '../AbstractGrantModeratorDialog';
|
2020-07-15 10:13:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Dialog to confirm a grant moderator action.
|
|
|
|
*/
|
|
|
|
class GrantModeratorDialog extends AbstractGrantModeratorDialog {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Dialog
|
|
|
|
okKey = 'dialog.Yes'
|
|
|
|
onSubmit = { this._onSubmit }
|
|
|
|
titleKey = 'dialog.grantModeratorTitle'
|
|
|
|
width = 'small'>
|
|
|
|
<div>
|
2021-09-10 11:05:16 +00:00
|
|
|
{ this.props.t('dialog.grantModeratorDialog', { participantName: this.props.participantName }) }
|
2020-07-15 10:13:28 +00:00
|
|
|
</div>
|
|
|
|
</Dialog>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
_onSubmit: () => boolean;
|
|
|
|
}
|
|
|
|
|
2021-09-10 11:05:16 +00:00
|
|
|
export default translate(connect(abstractMapStateToProps)(GrantModeratorDialog));
|