Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Consistent naming of react-redux's mapStateToProps
Lyubomir Marinov2189ab7ee6dd
diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.jsindex b8cf519a2c..9c1c5f92a7 100644--- a/react/features/conference/components/Conference.native.js+++ b/react/features/conference/components/Conference.native.js@@ -229,11 +229,12 @@ class Conference extends Component {* Maps (parts of) the Redux state to the associated Conference's props.** @param {Object} state - The Redux state.+ * @private* @returns {{* _passwordRequired: boolean* }}*/-function mapStateToProps(state) {+function _mapStateToProps(state) {return {/*** The indicator which determines whether a password is required to join@@ -255,4 +256,4 @@ function mapStateToProps(state) {};}-export default reactReduxConnect(mapStateToProps)(Conference);+export default reactReduxConnect(_mapStateToProps)(Conference);diff --git a/react/features/conference/components/ParticipantView.native.js b/react/features/conference/components/ParticipantView.native.jsindex 84551b0080..e9da6605ea 100644--- a/react/features/conference/components/ParticipantView.native.js+++ b/react/features/conference/components/ParticipantView.native.js@@ -155,12 +155,13 @@ function _toBoolean(value, undefinedValue) {* @param {Object} state - The Redux state.* @param {Object} ownProps - The React Component props passed to the associated* (instance of) ParticipantView.+ * @private* @returns {{* _avatar: string,* _videoTrack: Track* }}*/-function mapStateToProps(state, ownProps) {+function _mapStateToProps(state, ownProps) {const participantId = ownProps.participantId;const participant= getParticipantById(@@ -177,4 +178,4 @@ function mapStateToProps(state, ownProps) {};}-export default connect(mapStateToProps)(ParticipantView);+export default connect(_mapStateToProps)(ParticipantView);diff --git a/react/features/film-strip/components/FilmStrip.js b/react/features/film-strip/components/FilmStrip.jsindex 052c39279b..c285c3f264 100644--- a/react/features/film-strip/components/FilmStrip.js+++ b/react/features/film-strip/components/FilmStrip.js@@ -99,11 +99,12 @@ class FilmStrip extends Component {* Function that maps parts of Redux state tree into component props.** @param {Object} state - Redux state.+ * @private* @returns {{* _participants: Participant[],* }}*/-function mapStateToProps(state) {+function _mapStateToProps(state) {return {/*** The participants in the conference.@@ -115,4 +116,4 @@ function mapStateToProps(state) {};}-export default connect(mapStateToProps)(FilmStrip);+export default connect(_mapStateToProps)(FilmStrip);diff --git a/react/features/film-strip/components/Thumbnail.js b/react/features/film-strip/components/Thumbnail.jsindex 3728908e24..7157774b05 100644--- a/react/features/film-strip/components/Thumbnail.js+++ b/react/features/film-strip/components/Thumbnail.js@@ -133,13 +133,14 @@ class Thumbnail extends Component {** @param {Object} state - Redux state.* @param {Object} ownProps - Properties of component.+ * @private* @returns {{* _audioTrack: Track,* _largeVideo: Object,* _videoTrack: Track* }}*/-function mapStateToProps(state, ownProps) {+function _mapStateToProps(state, ownProps) {// We need read-only access to the state of features/large-video so that the// film strip doesn't render the video of the participant who is rendered on// the stage i.e. as a large video.@@ -158,4 +159,4 @@ function mapStateToProps(state, ownProps) {};}-export default connect(mapStateToProps)(Thumbnail);+export default connect(_mapStateToProps)(Thumbnail);diff --git a/react/features/large-video/components/LargeVideo.js b/react/features/large-video/components/LargeVideo.jsindex a3eda7ec39..2ff5f4524e 100644--- a/react/features/large-video/components/LargeVideo.js+++ b/react/features/large-video/components/LargeVideo.js@@ -46,14 +46,15 @@ class LargeVideo extends Component {* Maps (parts of) the Redux state to the associated LargeVideo's props.** @param {Object} state - Redux state.+ * @private* @returns {{* _participantId: string* }}*/-function mapStateToProps(state) {+function _mapStateToProps(state) {return {_participantId: state['features/large-video'].participantId};}-export default connect(mapStateToProps)(LargeVideo);+export default connect(_mapStateToProps)(LargeVideo);diff --git a/react/features/toolbar/components/AbstractToolbar.js b/react/features/toolbar/components/AbstractToolbar.jsindex ba68ca4bd6..59f9dcdd0f 100644--- a/react/features/toolbar/components/AbstractToolbar.js+++ b/react/features/toolbar/components/AbstractToolbar.js@@ -138,13 +138,14 @@ export class AbstractToolbar extends Component {* Maps parts of media state to component props.** @param {Object} state - Redux state.+ * @protected* @returns {{* _audioMuted: boolean,* _locked: boolean,* _videoMuted: boolean* }}*/-export function mapStateToProps(state) {+export function _mapStateToProps(state) {const conference = state['features/base/conference'];const media = state['features/base/media'];diff --git a/react/features/toolbar/components/Toolbar.native.js b/react/features/toolbar/components/Toolbar.native.jsindex faebfa72bd..a015fae19b 100644--- a/react/features/toolbar/components/Toolbar.native.js+++ b/react/features/toolbar/components/Toolbar.native.js@@ -6,7 +6,7 @@ import { MEDIA_TYPE, toggleCameraFacingMode } from '../../base/media';import { Container } from '../../base/react';import { ColorPalette } from '../../base/styles';-import { AbstractToolbar, mapStateToProps } from './AbstractToolbar';+import { AbstractToolbar, _mapStateToProps } from './AbstractToolbar';import { styles } from './styles';import ToolbarButton from './ToolbarButton';@@ -160,4 +160,4 @@ Object.assign(Toolbar.prototype, {videoMutedIcon: 'camera-disabled'});-export default connect(mapStateToProps)(Toolbar);+export default connect(_mapStateToProps)(Toolbar);diff --git a/react/features/unsupported-browser/components/UnsupportedMobileBrowser.js b/react/features/unsupported-browser/components/UnsupportedMobileBrowser.jsindex 97ae1f6f57..979afda032 100644--- a/react/features/unsupported-browser/components/UnsupportedMobileBrowser.js+++ b/react/features/unsupported-browser/components/UnsupportedMobileBrowser.js@@ -124,11 +124,12 @@ class UnsupportedMobileBrowser extends Component {* props.** @param {Object} state - Redux state.+ * @private* @returns {{* _room: string* }}*/-function mapStateToProps(state) {+function _mapStateToProps(state) {return {/*** The name of the conference room to be joined upon clicking the@@ -141,4 +142,4 @@ function mapStateToProps(state) {};}-export default connect(mapStateToProps)(UnsupportedMobileBrowser);+export default connect(_mapStateToProps)(UnsupportedMobileBrowser);diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.jsindex 393477e776..0c0e4ce9d1 100644--- a/react/features/welcome/components/AbstractWelcomePage.js+++ b/react/features/welcome/components/AbstractWelcomePage.js@@ -201,12 +201,13 @@ export class AbstractWelcomePage extends Component {* to be used in child classes for 'connect'.** @param {Object} state - Redux state.+ * @protected* @returns {{* _localVideoTrack: (Track|undefined),* _room: string* }}*/-export function mapStateToProps(state) {+export function _mapStateToProps(state) {const conference = state['features/base/conference'];const tracks = state['features/base/tracks'];diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.jsindex 75d43086b2..54f8bd7d14 100644--- a/react/features/welcome/components/WelcomePage.native.js+++ b/react/features/welcome/components/WelcomePage.native.js@@ -5,7 +5,7 @@ import { connect } from 'react-redux';import { Link } from '../../base/react';import { ColorPalette } from '../../base/styles';-import { AbstractWelcomePage, mapStateToProps } from './AbstractWelcomePage';+import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';import { styles } from './styles';/**@@ -125,4 +125,4 @@ class WelcomePage extends AbstractWelcomePage {}}-export default connect(mapStateToProps)(WelcomePage);+export default connect(_mapStateToProps)(WelcomePage);diff --git a/react/features/welcome/components/WelcomePage.web.js b/react/features/welcome/components/WelcomePage.web.jsindex 988fb9e26c..5b9c0eed45 100644--- a/react/features/welcome/components/WelcomePage.web.js+++ b/react/features/welcome/components/WelcomePage.web.js@@ -5,7 +5,7 @@ import { connect } from 'react-redux';import { Watermarks } from '../../base/react';-import { AbstractWelcomePage, mapStateToProps } from './AbstractWelcomePage';+import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';/* eslint-disable require-jsdoc */@@ -267,4 +267,4 @@ class WelcomePage extends AbstractWelcomePage {}}-export default connect(mapStateToProps)(WelcomePage);+export default connect(_mapStateToProps)(WelcomePage);