|
@@ -12,12 +12,6 @@ import { isAddPeopleEnabled, isDialOutEnabled } from '../../../functions';
|
12
|
12
|
|
13
|
13
|
type Props = AbstractButtonProps & {
|
14
|
14
|
|
15
|
|
- /**
|
16
|
|
- * Whether or not the feature to invite people to join the
|
17
|
|
- * conference is available.
|
18
|
|
- */
|
19
|
|
- _addPeopleEnabled: boolean,
|
20
|
|
-
|
21
|
15
|
/**
|
22
|
16
|
* The Redux dispatch function.
|
23
|
17
|
*/
|
|
@@ -42,16 +36,6 @@ class InviteButton extends AbstractButton<Props, *> {
|
42
|
36
|
_handleClick() {
|
43
|
37
|
this.props.dispatch(setAddPeopleDialogVisible(true));
|
44
|
38
|
}
|
45
|
|
-
|
46
|
|
- /**
|
47
|
|
- * Returns true if none of the invite methods are available.
|
48
|
|
- *
|
49
|
|
- * @protected
|
50
|
|
- * @returns {boolean}
|
51
|
|
- */
|
52
|
|
- _isDisabled() {
|
53
|
|
- return !this.props._addPeopleEnabled;
|
54
|
|
- }
|
55
|
39
|
}
|
56
|
40
|
|
57
|
41
|
/**
|
|
@@ -59,14 +43,17 @@ class InviteButton extends AbstractButton<Props, *> {
|
59
|
43
|
* props.
|
60
|
44
|
*
|
61
|
45
|
* @param {Object} state - The redux store/state.
|
|
46
|
+ * @param {Object} ownProps - The properties explicitly passed to the component
|
|
47
|
+ * instance.
|
62
|
48
|
* @private
|
63
|
|
- * @returns {{
|
64
|
|
- * _addPeopleEnabled: boolean
|
65
|
|
- * }}
|
|
49
|
+ * @returns {Object}
|
66
|
50
|
*/
|
67
|
|
-function _mapStateToProps(state) {
|
|
51
|
+function _mapStateToProps(state: Object, ownProps: Object) {
|
|
52
|
+ const addPeopleEnabled = isAddPeopleEnabled(state) || isDialOutEnabled(state);
|
|
53
|
+ const { visible = Boolean(addPeopleEnabled) } = ownProps;
|
|
54
|
+
|
68
|
55
|
return {
|
69
|
|
- _addPeopleEnabled: isAddPeopleEnabled(state) || isDialOutEnabled(state)
|
|
56
|
+ visible
|
70
|
57
|
};
|
71
|
58
|
}
|
72
|
59
|
|