|
|
@@ -16,6 +16,7 @@ import {
|
|
16
|
16
|
|
|
17
|
17
|
import { setTileView } from '../actions';
|
|
18
|
18
|
import logger from '../logger';
|
|
|
19
|
+import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags';
|
|
19
|
20
|
|
|
20
|
21
|
/**
|
|
21
|
22
|
* The type of the React {@code Component} props of {@link TileViewButton}.
|
|
|
@@ -83,13 +84,16 @@ class TileViewButton<P: Props> extends AbstractButton<P, *> {
|
|
83
|
84
|
* {@code TileViewButton} component.
|
|
84
|
85
|
*
|
|
85
|
86
|
* @param {Object} state - The Redux state.
|
|
86
|
|
- * @returns {{
|
|
87
|
|
- * _tileViewEnabled: boolean
|
|
88
|
|
- * }}
|
|
|
87
|
+ * @param {Object} ownProps - The properties explicitly passed to the component instance.
|
|
|
88
|
+ * @returns {Props}
|
|
89
|
89
|
*/
|
|
90
|
|
-function _mapStateToProps(state) {
|
|
|
90
|
+function _mapStateToProps(state, ownProps) {
|
|
|
91
|
+ const enabled = getFeatureFlag(state, TILE_VIEW_ENABLED, true);
|
|
|
92
|
+ const { visible = enabled } = ownProps;
|
|
|
93
|
+
|
|
91
|
94
|
return {
|
|
92
|
|
- _tileViewEnabled: state['features/video-layout'].tileViewEnabled
|
|
|
95
|
+ _tileViewEnabled: state['features/video-layout'].tileViewEnabled,
|
|
|
96
|
+ visible
|
|
93
|
97
|
};
|
|
94
|
98
|
}
|
|
95
|
99
|
|