Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ref(redux) Remove connect wrapper (#13083)

Robert Pintilii754f6584891a
diff --git a/react/features/authentication/components/native/WaitForOwnerDialog.js b/react/features/authentication/components/native/WaitForOwnerDialog.js
index 7a90ee1aee..bb7e6ca6ae 100644
--- a/react/features/authentication/components/native/WaitForOwnerDialog.js
+++ b/react/features/authentication/components/native/WaitForOwnerDialog.js
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import { cancelWaitForOwner, openLoginDialog } from '../../actions.native';
/**
diff --git a/react/features/authentication/components/web/LoginDialog.tsx b/react/features/authentication/components/web/LoginDialog.tsx
index 35a0f7f15a..44ee5fe957 100644
--- a/react/features/authentication/components/web/LoginDialog.tsx
+++ b/react/features/authentication/components/web/LoginDialog.tsx
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect as reduxConnect } from 'react-redux';
// @ts-expect-error
import { connect } from '../../../../../connection';
@@ -9,7 +10,6 @@ import { IConfig } from '../../../base/config/configType';
import { toJid } from '../../../base/connection/functions';
import { translate, translateToHTML } from '../../../base/i18n/functions';
import { JitsiConnectionErrors } from '../../../base/lib-jitsi-meet';
-import { connect as reduxConnect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Input from '../../../base/ui/components/web/Input';
import {
@@ -26,7 +26,7 @@ interface IProps extends WithTranslation {
* {@link JitsiConference} That needs authentication - will hold a valid
* value in XMPP login + guest access mode.
*/
- _conference: IJitsiConference;
+ _conference?: IJitsiConference;
/**
* The server hosts specified in the global config.
@@ -47,7 +47,7 @@ interface IProps extends WithTranslation {
* The progress in the floating range between 0 and 1 of the authenticating
* and upgrading the role of the local participant/user.
*/
- _progress: number;
+ _progress?: number;
/**
* Redux store dispatch method.
diff --git a/react/features/authentication/components/web/WaitForOwnerDialog.tsx b/react/features/authentication/components/web/WaitForOwnerDialog.tsx
index efbb59d96d..48ef7431f5 100644
--- a/react/features/authentication/components/web/WaitForOwnerDialog.tsx
+++ b/react/features/authentication/components/web/WaitForOwnerDialog.tsx
@@ -1,9 +1,9 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IStore } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import { cancelWaitForOwner } from '../../actions.web';
diff --git a/react/features/base/avatar/components/Avatar.js b/react/features/base/avatar/components/Avatar.js
index 6b21b17d36..40d2011e5f 100644
--- a/react/features/base/avatar/components/Avatar.js
+++ b/react/features/base/avatar/components/Avatar.js
@@ -1,9 +1,9 @@
// @flow
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import { getParticipantById } from '../../participants';
-import { connect } from '../../redux';
import { getAvatarColor, getInitials, isCORSAvatarURL } from '../functions';
import { StatelessAvatar } from './';
diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.ts
index ba98f0a4db..8229d88cc4 100644
--- a/react/features/base/conference/reducer.ts
+++ b/react/features/base/conference/reducer.ts
@@ -99,9 +99,7 @@ export interface IJitsiConference {
export interface IConferenceState {
authEnabled?: boolean;
authLogin?: string;
- authRequired?: {
- join: Function;
- };
+ authRequired?: IJitsiConference;
conference?: IJitsiConference;
conferenceTimestamp?: number;
e2eeSupported?: boolean;
diff --git a/react/features/base/dialog/actions.ts b/react/features/base/dialog/actions.ts
index 162e548f73..65a0563ed7 100644
--- a/react/features/base/dialog/actions.ts
+++ b/react/features/base/dialog/actions.ts
@@ -74,7 +74,7 @@ export function openDialog(component: ComponentType<any>, componentProps?: Objec
* componentProps: (Object | undefined)
* }}
*/
-export function openSheet(component: ComponentType, componentProps?: Object) {
+export function openSheet(component: ComponentType<any>, componentProps?: Object) {
return {
type: OPEN_SHEET,
component,
diff --git a/react/features/base/dialog/components/native/AlertDialog.js b/react/features/base/dialog/components/native/AlertDialog.js
index 8688875d74..6e9afd59e2 100644
--- a/react/features/base/dialog/components/native/AlertDialog.js
+++ b/react/features/base/dialog/components/native/AlertDialog.js
@@ -1,8 +1,8 @@
import React from 'react';
import Dialog from 'react-native-dialog';
+import { connect } from 'react-redux';
import { translate } from '../../../i18n';
-import { connect } from '../../../redux';
import { _abstractMapStateToProps } from '../../functions';
import AbstractDialog, { type Props as AbstractProps } from '../AbstractDialog';
import { renderHTML } from '../functions.native';
diff --git a/react/features/base/dialog/components/native/BottomSheet.js b/react/features/base/dialog/components/native/BottomSheet.js
index 7456013677..891cd2fb6d 100644
--- a/react/features/base/dialog/components/native/BottomSheet.js
+++ b/react/features/base/dialog/components/native/BottomSheet.js
@@ -1,8 +1,8 @@
import React, { type Node, PureComponent } from 'react';
import { SafeAreaView, ScrollView, View } from 'react-native';
+import { connect } from 'react-redux';
import { SlidingView } from '../../../react';
-import { connect } from '../../../redux';
import { hideSheet } from '../../actions';
import { bottomSheetStyles as styles } from './styles';
diff --git a/react/features/base/dialog/components/native/ConfirmDialog.js b/react/features/base/dialog/components/native/ConfirmDialog.js
index 9d3f8287a3..72ebaa7b5f 100644
--- a/react/features/base/dialog/components/native/ConfirmDialog.js
+++ b/react/features/base/dialog/components/native/ConfirmDialog.js
@@ -1,8 +1,8 @@
import React from 'react';
import Dialog from 'react-native-dialog';
+import { connect } from 'react-redux';
import { translate } from '../../../i18n';
-import { connect } from '../../../redux';
import AbstractDialog from '../AbstractDialog';
import { renderHTML } from '../functions.native';
diff --git a/react/features/base/dialog/components/native/DialogContainer.js b/react/features/base/dialog/components/native/DialogContainer.js
index 6b761180c6..053f0d6c94 100644
--- a/react/features/base/dialog/components/native/DialogContainer.js
+++ b/react/features/base/dialog/components/native/DialogContainer.js
@@ -1,8 +1,8 @@
import React, { Fragment } from 'react';
+import { connect } from 'react-redux';
import { ReactionEmoji } from '../../../../reactions/components';
import { getReactionsQueue } from '../../../../reactions/functions.any';
-import { connect } from '../../../redux';
import AbstractDialogContainer, {
abstractMapStateToProps
} from '../AbstractDialogContainer';
diff --git a/react/features/base/dialog/components/native/InputDialog.js b/react/features/base/dialog/components/native/InputDialog.js
index e302911d7f..82899d4b46 100644
--- a/react/features/base/dialog/components/native/InputDialog.js
+++ b/react/features/base/dialog/components/native/InputDialog.js
@@ -1,8 +1,8 @@
import React from 'react';
import Dialog from 'react-native-dialog';
+import { connect } from 'react-redux';
import { translate } from '../../../i18n';
-import { connect } from '../../../redux';
import { _abstractMapStateToProps } from '../../functions';
import AbstractDialog, {
type Props as AbstractProps,
diff --git a/react/features/base/dialog/components/native/PageReloadDialog.tsx b/react/features/base/dialog/components/native/PageReloadDialog.tsx
index 35b56c9cf4..41e261f743 100644
--- a/react/features/base/dialog/components/native/PageReloadDialog.tsx
+++ b/react/features/base/dialog/components/native/PageReloadDialog.tsx
@@ -4,13 +4,12 @@
import { randomInt } from '@jitsi/js-utils/random';
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
-import type { Dispatch } from 'redux';
+import { connect } from 'react-redux';
import { appNavigate, reloadNow } from '../../../../app/actions.native';
-import { IReduxState } from '../../../../app/types';
+import { IReduxState, IStore } from '../../../../app/types';
import { translate } from '../../../i18n/functions';
import { isFatalJitsiConnectionError } from '../../../lib-jitsi-meet/functions.native';
-import { connect } from '../../../redux/functions';
import { hideDialog } from '../../actions';
// @ts-ignore
import logger from '../../logger';
@@ -24,9 +23,9 @@ import ConfirmDialog from './ConfirmDialog';
* {@link PageReloadDialog}.
*/
interface IPageReloadDialogProps extends WithTranslation {
- dispatch: Dispatch<any>;
+ dispatch: IStore['dispatch'];
isNetworkFailure: boolean;
- reason: string;
+ reason?: string;
}
/**
@@ -208,7 +207,7 @@ function mapStateToProps(state: IReduxState) {
= connectionError && isFatalJitsiConnectionError(connectionError);
const fatalConfigError = fatalError === configError;
- const isNetworkFailure = fatalConfigError || fatalConnectionError;
+ const isNetworkFailure = Boolean(fatalConfigError || fatalConnectionError);
let reason;
diff --git a/react/features/base/media/components/native/VideoTrack.js b/react/features/base/media/components/native/VideoTrack.js
index da19700f9d..532d49d3b5 100644
--- a/react/features/base/media/components/native/VideoTrack.js
+++ b/react/features/base/media/components/native/VideoTrack.js
@@ -2,8 +2,8 @@
import React from 'react';
import { View } from 'react-native';
+import { connect } from 'react-redux';
-import { connect } from '../../../redux';
import AbstractVideoTrack from '../AbstractVideoTrack';
import type { Props } from '../AbstractVideoTrack';
diff --git a/react/features/base/media/components/native/VideoTransform.tsx b/react/features/base/media/components/native/VideoTransform.tsx
index e7cf4686d9..6b962e1568 100644
--- a/react/features/base/media/components/native/VideoTransform.tsx
+++ b/react/features/base/media/components/native/VideoTransform.tsx
@@ -1,10 +1,9 @@
import React, { Component } from 'react';
import { PanResponder, PixelRatio, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
-import { type Dispatch } from 'redux';
+import { connect } from 'react-redux';
-import { IReduxState } from '../../../../app/types';
-import { connect } from '../../../redux/functions';
+import { IReduxState, IStore } from '../../../../app/types';
import { ASPECT_RATIO_WIDE } from '../../../responsive-ui/constants';
import { storeVideoTransform } from '../../actions';
@@ -692,7 +691,7 @@ class VideoTransform extends Component<Props, State> {
* _onUnmount: Function
* }}
*/
-function _mapDispatchToProps(dispatch: Dispatch<any>) {
+function _mapDispatchToProps(dispatch: IStore['dispatch']) {
return {
/**
* Dispatches actions to store the last applied transform to a video.
diff --git a/react/features/base/media/components/web/AudioTrack.js b/react/features/base/media/components/web/AudioTrack.js
index 91ab4a2af3..182c5190ef 100644
--- a/react/features/base/media/components/web/AudioTrack.js
+++ b/react/features/base/media/components/web/AudioTrack.js
@@ -1,9 +1,9 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { createAudioPlayErrorEvent, createAudioPlaySuccessEvent, sendAnalytics } from '../../../../analytics';
-import { connect } from '../../../redux';
import logger from '../../logger';
/**
diff --git a/react/features/base/media/components/web/VideoTrack.js b/react/features/base/media/components/web/VideoTrack.js
index f40217aa0b..f0e855527f 100644
--- a/react/features/base/media/components/web/VideoTrack.js
+++ b/react/features/base/media/components/web/VideoTrack.js
@@ -1,8 +1,8 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../redux';
import AbstractVideoTrack from '../AbstractVideoTrack';
import type { Props as AbstractVideoTrackProps } from '../AbstractVideoTrack';
diff --git a/react/features/base/participants/components/ParticipantView.native.js b/react/features/base/participants/components/ParticipantView.native.js
index 6e3bc2e4d8..b69df635bd 100644
--- a/react/features/base/participants/components/ParticipantView.native.js
+++ b/react/features/base/participants/components/ParticipantView.native.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import {
isTrackStreamingStatusActive,
@@ -11,7 +12,7 @@ import { translate } from '../../i18n/functions';
import VideoTrack from '../../media/components/native/VideoTrack';
import { shouldRenderVideoTrack } from '../../media/functions';
import { Container } from '../../react';
-import { connect, toState } from '../../redux/functions';
+import { toState } from '../../redux/functions';
import { TestHint } from '../../testing/components';
import { getVideoTrackByParticipant } from '../../tracks/functions';
import { getParticipantById, getParticipantDisplayName, isSharedVideoParticipant } from '../functions';
diff --git a/react/features/base/popover/components/Popover.web.tsx b/react/features/base/popover/components/Popover.web.tsx
index a9ce4b02d3..6198d5b507 100644
--- a/react/features/base/popover/components/Popover.web.tsx
+++ b/react/features/base/popover/components/Popover.web.tsx
@@ -1,11 +1,11 @@
import React, { Component, ReactNode } from 'react';
import ReactFocusLock from 'react-focus-lock';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import DialogPortal from '../../../toolbox/components/web/DialogPortal';
import Drawer from '../../../toolbox/components/web/Drawer';
import JitsiPortal from '../../../toolbox/components/web/JitsiPortal';
-import { connect } from '../../redux/functions';
import { getContextMenuStyle } from '../functions.web';
/**
diff --git a/react/features/base/premeeting/components/web/ConnectionStatus.tsx b/react/features/base/premeeting/components/web/ConnectionStatus.tsx
index 9973327ec7..e8ee693d0c 100644
--- a/react/features/base/premeeting/components/web/ConnectionStatus.tsx
+++ b/react/features/base/premeeting/components/web/ConnectionStatus.tsx
@@ -1,12 +1,12 @@
import React, { useCallback, useState } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { IReduxState } from '../../../../app/types';
import { translate } from '../../../i18n/functions';
import Icon from '../../../icons/components/Icon';
import { IconArrowDown, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg';
-import { connect } from '../../../redux/functions';
import { withPixelLineHeight } from '../../../styles/functions.web';
import { PREJOIN_DEFAULT_CONTENT_WIDTH } from '../../../ui/components/variables';
import { CONNECTION_TYPE } from '../../constants';
@@ -217,7 +217,7 @@ function ConnectionStatus({ connectionDetails, t, connectionType }: IProps) {
* @param {Object} state - The redux state.
* @returns {Object}
*/
-function mapStateToProps(state: IReduxState): Object {
+function mapStateToProps(state: IReduxState) {
const { connectionDetails, connectionType } = getConnectionData(state);
return {
diff --git a/react/features/base/premeeting/components/web/Preview.js b/react/features/base/premeeting/components/web/Preview.js
index d12b86ef00..c8ea43e1af 100644
--- a/react/features/base/premeeting/components/web/Preview.js
+++ b/react/features/base/premeeting/components/web/Preview.js
@@ -1,12 +1,12 @@
// @flow
import React, { useEffect } from 'react';
+import { connect } from 'react-redux';
import { getDisplayName } from '../../../../base/settings';
import { Avatar } from '../../../avatar';
import { Video } from '../../../media';
import { getLocalParticipant } from '../../../participants';
-import { connect } from '../../../redux';
import { getLocalVideoTrack } from '../../../tracks';
declare var APP: Object;
@@ -26,7 +26,7 @@ export type Props = {
/**
* The name of the user that is about to join.
*/
- name: string,
+ name: string,
/**
* Flag signaling the visibility of camera preview.
diff --git a/react/features/base/react/components/web/Watermarks.js b/react/features/base/react/components/web/Watermarks.js
index 84e9b2381a..f75b02d820 100644
--- a/react/features/base/react/components/web/Watermarks.js
+++ b/react/features/base/react/components/web/Watermarks.js
@@ -1,10 +1,10 @@
/* @flow */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { isVpaasMeeting } from '../../../../jaas/functions';
import { translate } from '../../../i18n';
-import { connect } from '../../../redux';
declare var interfaceConfig: Object;
diff --git a/react/features/base/redux/functions.ts b/react/features/base/redux/functions.ts
index 3ce849efae..c0d7581957 100644
--- a/react/features/base/redux/functions.ts
+++ b/react/features/base/redux/functions.ts
@@ -1,5 +1,4 @@
import _ from 'lodash';
-import { connect as reduxConnect } from 'react-redux';
import { IReduxState } from '../../app/types';
import { IStateful } from '../app/types';
@@ -27,19 +26,6 @@ export function assign<T extends Object>(target: T, source: Partial<T>): T {
return t;
}
-/**
- * Wrapper function for the react-redux connect function to avoid having to
- * declare function types for flow, but still let flow warn for other errors.
- *
- * @param {any} mapStateToProps - Redux mapStateToProps function.
- * @param {Function?} mapDispatchToProps - Redux mapDispatchToProps function.
- * @returns {Connector}
- */
-export function connect(
- mapStateToProps?: any, mapDispatchToProps?: Function | Object) {
- return reduxConnect(mapStateToProps, mapDispatchToProps);
-}
-
/**
* Determines whether {@code a} equals {@code b} according to deep comparison
* (which makes sense for Redux and its state definition).
diff --git a/react/features/base/settings/components/native/SettingsButton.tsx b/react/features/base/settings/components/native/SettingsButton.tsx
index 48d6221ae2..1336a5c2c8 100644
--- a/react/features/base/settings/components/native/SettingsButton.tsx
+++ b/react/features/base/settings/components/native/SettingsButton.tsx
@@ -1,5 +1,7 @@
/* eslint-disable lines-around-comment */
+import { connect } from 'react-redux';
+
import { IReduxState } from '../../../../app/types';
import { translate } from '../../../../base/i18n/functions';
import { IconGear } from '../../../../base/icons/svg';
@@ -12,7 +14,6 @@ import { navigate }
import { screen } from '../../../../mobile/navigation/routes';
import { SETTINGS_ENABLED } from '../../../flags/constants';
import { getFeatureFlag } from '../../../flags/functions';
-import { connect } from '../../../redux/functions';
/**
* Implements an {@link AbstractButton} to open the carmode.
diff --git a/react/features/base/sounds/components/SoundCollection.js b/react/features/base/sounds/components/SoundCollection.js
index 83994ea979..1f4b98a63f 100644
--- a/react/features/base/sounds/components/SoundCollection.js
+++ b/react/features/base/sounds/components/SoundCollection.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { Audio } from '../../media';
import type { AudioElement } from '../../media';
-import { connect } from '../../redux';
import { _addAudioElement, _removeAudioElement } from '../actions';
import type { Sound } from '../reducer';
diff --git a/react/features/base/testing/components/TestConnectionInfo.js b/react/features/base/testing/components/TestConnectionInfo.js
index 987a6ad5db..42fc072e7f 100644
--- a/react/features/base/testing/components/TestConnectionInfo.js
+++ b/react/features/base/testing/components/TestConnectionInfo.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component, Fragment } from 'react';
+import { connect } from 'react-redux';
import statsEmitter from '../../../connection-indicator/statsEmitter';
import { getLocalParticipant } from '../../participants';
-import { connect } from '../../redux';
import { isTestModeEnabled } from '../functions';
import { TestHint } from './index';
diff --git a/react/features/base/testing/components/TestHint.android.js b/react/features/base/testing/components/TestHint.android.js
index dd3af79b37..9d2ff8954e 100644
--- a/react/features/base/testing/components/TestHint.android.js
+++ b/react/features/base/testing/components/TestHint.android.js
@@ -2,8 +2,7 @@
import React, { Component } from 'react';
import { Text } from 'react-native';
-
-import { connect } from '../../redux';
+import { connect } from 'react-redux';
import type { TestHintProps } from './AbstractTestHint';
import { _mapStateToProps } from './AbstractTestHint';
diff --git a/react/features/base/testing/components/TestHint.ios.js b/react/features/base/testing/components/TestHint.ios.js
index 029258316d..2f4301adde 100644
--- a/react/features/base/testing/components/TestHint.ios.js
+++ b/react/features/base/testing/components/TestHint.ios.js
@@ -2,8 +2,7 @@
import React, { Component } from 'react';
import { Text } from 'react-native';
-
-import { connect } from '../../redux';
+import { connect } from 'react-redux';
import type { TestHintProps } from './AbstractTestHint';
import { _mapStateToProps } from './AbstractTestHint';
diff --git a/react/features/base/ui/components/web/DialogContainer.tsx b/react/features/base/ui/components/web/DialogContainer.tsx
index 19e0d66fde..4cbaa884e0 100644
--- a/react/features/base/ui/components/web/DialogContainer.tsx
+++ b/react/features/base/ui/components/web/DialogContainer.tsx
@@ -1,10 +1,10 @@
import React, { Component, ComponentType } from 'react';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../../app/types';
import { IReactionEmojiProps } from '../../../../reactions/constants';
import JitsiPortal from '../../../../toolbox/components/web/JitsiPortal';
import { showOverflowDrawer } from '../../../../toolbox/functions.web';
-import { connect } from '../../../redux/functions';
import DialogTransition from './DialogTransition';
@@ -13,12 +13,12 @@ interface IProps {
/**
* The component to render.
*/
- _component: ComponentType;
+ _component?: ComponentType;
/**
* The props to pass to the component that will be rendered.
*/
- _componentProps: Object;
+ _componentProps?: Object;
/**
* Whether the overflow drawer should be used.
diff --git a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js
index 1e7f30b93f..cb6f0978b9 100644
--- a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js
+++ b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js
@@ -1,6 +1,7 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import {
@@ -9,7 +10,6 @@ import {
} from '../../analytics';
import { translate } from '../../base/i18n';
import { Icon, IconPlus } from '../../base/icons';
-import { connect } from '../../base/redux';
import Tooltip from '../../base/tooltip/components/Tooltip';
import { updateCalendarEvent } from '../actions';
diff --git a/react/features/calendar-sync/components/CalendarList.native.js b/react/features/calendar-sync/components/CalendarList.native.js
index 8ab089dbf8..f276f58bf0 100644
--- a/react/features/calendar-sync/components/CalendarList.native.js
+++ b/react/features/calendar-sync/components/CalendarList.native.js
@@ -6,10 +6,10 @@ import {
TouchableOpacity,
View
} from 'react-native';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
import { AbstractPage } from '../../base/react';
-import { connect } from '../../base/redux';
import { openSettings } from '../../mobile/permissions';
import { refreshCalendar } from '../actions';
diff --git a/react/features/calendar-sync/components/CalendarList.web.js b/react/features/calendar-sync/components/CalendarList.web.js
index 2cc784ea3b..23fb060113 100644
--- a/react/features/calendar-sync/components/CalendarList.web.js
+++ b/react/features/calendar-sync/components/CalendarList.web.js
@@ -1,6 +1,7 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import {
createCalendarClickedEvent,
@@ -9,7 +10,6 @@ import {
import { translate } from '../../base/i18n';
import { Icon, IconCalendar } from '../../base/icons';
import { AbstractPage } from '../../base/react';
-import { connect } from '../../base/redux';
import Spinner from '../../base/ui/components/web/Spinner';
import { SETTINGS_TABS, openSettingsDialog } from '../../settings';
import { refreshCalendar } from '../actions';
diff --git a/react/features/calendar-sync/components/CalendarListContent.native.js b/react/features/calendar-sync/components/CalendarListContent.native.js
index 9be588e43f..30d1fa6131 100644
--- a/react/features/calendar-sync/components/CalendarListContent.native.js
+++ b/react/features/calendar-sync/components/CalendarListContent.native.js
@@ -1,6 +1,7 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import {
createCalendarClickedEvent,
@@ -10,7 +11,6 @@ import {
import { appNavigate } from '../../app/actions';
import { getLocalizedDateFormatter, translate } from '../../base/i18n';
import { NavigateSectionList } from '../../base/react';
-import { connect } from '../../base/redux';
import { openUpdateCalendarEventDialog, refreshCalendar } from '../actions';
diff --git a/react/features/calendar-sync/components/CalendarListContent.web.js b/react/features/calendar-sync/components/CalendarListContent.web.js
index 67dd115119..9768a62998 100644
--- a/react/features/calendar-sync/components/CalendarListContent.web.js
+++ b/react/features/calendar-sync/components/CalendarListContent.web.js
@@ -1,6 +1,7 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import {
createCalendarClickedEvent,
@@ -9,7 +10,6 @@ import {
} from '../../analytics';
import { appNavigate } from '../../app/actions';
import { MeetingsList } from '../../base/react';
-import { connect } from '../../base/redux';
import AddMeetingUrlButton from './AddMeetingUrlButton';
import JoinButton from './JoinButton';
diff --git a/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js b/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js
index a1bf4b1327..f8534f1b9d 100644
--- a/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js
+++ b/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
-import { connect } from '../../base/redux';
import { updateCalendarEvent } from '../actions';
type Props = {
diff --git a/react/features/chat/components/AbstractChatPrivacyDialog.tsx b/react/features/chat/components/AbstractChatPrivacyDialog.tsx
index 5785bfd829..252d83047b 100644
--- a/react/features/chat/components/AbstractChatPrivacyDialog.tsx
+++ b/react/features/chat/components/AbstractChatPrivacyDialog.tsx
@@ -19,9 +19,9 @@ interface IProps extends WithTranslation {
_onSetMessageRecipient: Function;
/**
- * The participant retrieved from Redux by the participanrID prop.
+ * The participant retrieved from Redux by the participantID prop.
*/
- _participant: Object;
+ _participant?: IParticipant;
/**
* The message that is about to be sent.
diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js
index ec578bee02..f51a731347 100644
--- a/react/features/chat/components/native/Chat.js
+++ b/react/features/chat/components/native/Chat.js
@@ -2,10 +2,10 @@
import { useIsFocused } from '@react-navigation/native';
import React, { useEffect } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
-import { connect } from '../../../base/redux';
import { TabBarLabelCounter } from '../../../mobile/navigation/components/TabBarLabelCounter';
import { closeChat } from '../../actions.native';
import AbstractChat, {
diff --git a/react/features/chat/components/native/ChatButton.js b/react/features/chat/components/native/ChatButton.js
index 0cca6b1077..431c672457 100644
--- a/react/features/chat/components/native/ChatButton.js
+++ b/react/features/chat/components/native/ChatButton.js
@@ -1,7 +1,8 @@
+import { connect } from 'react-redux';
+
import { CHAT_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconChatUnread, IconMessage } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import {
AbstractButton,
type AbstractButtonProps
diff --git a/react/features/chat/components/native/ChatMessage.js b/react/features/chat/components/native/ChatMessage.js
index b8adfd1c05..2797af0c9a 100644
--- a/react/features/chat/components/native/ChatMessage.js
+++ b/react/features/chat/components/native/ChatMessage.js
@@ -1,10 +1,10 @@
import React from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { translate } from '../../../base/i18n';
import { Linkify } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { isGifMessage } from '../../../gifs/functions';
import { MESSAGE_TYPE_ERROR, MESSAGE_TYPE_LOCAL } from '../../constants';
import { replaceNonUnicodeEmojis } from '../../functions';
diff --git a/react/features/chat/components/native/ChatPrivacyDialog.js b/react/features/chat/components/native/ChatPrivacyDialog.js
index 25f46ee798..3fd3ce510d 100644
--- a/react/features/chat/components/native/ChatPrivacyDialog.js
+++ b/react/features/chat/components/native/ChatPrivacyDialog.js
@@ -1,8 +1,8 @@
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import { AbstractChatPrivacyDialog, _mapDispatchToProps, _mapStateToProps } from '../AbstractChatPrivacyDialog';
/**
diff --git a/react/features/chat/components/native/MessageContainer.js b/react/features/chat/components/native/MessageContainer.js
index 032057fc23..04761a32b0 100644
--- a/react/features/chat/components/native/MessageContainer.js
+++ b/react/features/chat/components/native/MessageContainer.js
@@ -1,8 +1,8 @@
import React, { ReactElement } from 'react';
import { FlatList, Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractMessageContainer, { type Props as AbstractProps }
from '../AbstractMessageContainer';
diff --git a/react/features/chat/components/native/MessageRecipient.js b/react/features/chat/components/native/MessageRecipient.js
index 4acc79e73f..561649490c 100644
--- a/react/features/chat/components/native/MessageRecipient.js
+++ b/react/features/chat/components/native/MessageRecipient.js
@@ -1,9 +1,9 @@
import React from 'react';
import { Text, TouchableHighlight, View } from 'react-native';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { Icon, IconCloseLarge } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import {
setParams
} from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
diff --git a/react/features/chat/components/native/PrivateMessageButton.js b/react/features/chat/components/native/PrivateMessageButton.js
index 8260f9e5c2..b1ca6502fc 100644
--- a/react/features/chat/components/native/PrivateMessageButton.js
+++ b/react/features/chat/components/native/PrivateMessageButton.js
@@ -1,8 +1,9 @@
+import { connect } from 'react-redux';
+
import { CHAT_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconMessage, IconReply } from '../../../base/icons';
import { getParticipantById } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { handleLobbyChatInitialized, openChat } from '../../../chat/actions.native';
import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
diff --git a/react/features/chat/components/web/Chat.js b/react/features/chat/components/web/Chat.js
index 486e8e2277..92ffcd52b7 100644
--- a/react/features/chat/components/web/Chat.js
+++ b/react/features/chat/components/web/Chat.js
@@ -1,8 +1,8 @@
import clsx from 'clsx';
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import Tabs from '../../../base/ui/components/web/Tabs';
import { PollsPane } from '../../../polls/components';
import { toggleChat } from '../../actions.web';
diff --git a/react/features/chat/components/web/ChatButton.js b/react/features/chat/components/web/ChatButton.js
index 2a14852729..37b500bd7c 100644
--- a/react/features/chat/components/web/ChatButton.js
+++ b/react/features/chat/components/web/ChatButton.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconMessage } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import ChatCounter from './ChatCounter';
diff --git a/react/features/chat/components/web/ChatCounter.js b/react/features/chat/components/web/ChatCounter.js
index 8869a3cbd0..c52bb3d8e0 100644
--- a/react/features/chat/components/web/ChatCounter.js
+++ b/react/features/chat/components/web/ChatCounter.js
@@ -1,8 +1,8 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../base/redux';
import { getUnreadPollCount } from '../../../polls/functions';
import { getUnreadCount } from '../../functions';
diff --git a/react/features/chat/components/web/ChatHeader.js b/react/features/chat/components/web/ChatHeader.js
index 0b5b476a0b..ce6550ea1a 100644
--- a/react/features/chat/components/web/ChatHeader.js
+++ b/react/features/chat/components/web/ChatHeader.js
@@ -1,10 +1,10 @@
// @flow
import React, { useCallback } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { Icon, IconCloseLarge } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { toggleChat } from '../../actions.web';
type Props = {
diff --git a/react/features/chat/components/web/ChatInput.tsx b/react/features/chat/components/web/ChatInput.tsx
index 2a8b40923e..609dd4efd7 100644
--- a/react/features/chat/components/web/ChatInput.tsx
+++ b/react/features/chat/components/web/ChatInput.tsx
@@ -1,11 +1,11 @@
import React, { Component, RefObject } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState, IStore } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions';
import { IconFaceSmile, IconSend } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
import Button from '../../../base/ui/components/web/Button';
import Input from '../../../base/ui/components/web/Input';
import { areSmileysDisabled } from '../../functions';
diff --git a/react/features/chat/components/web/ChatPrivacyDialog.tsx b/react/features/chat/components/web/ChatPrivacyDialog.tsx
index bf80468997..805c92d214 100644
--- a/react/features/chat/components/web/ChatPrivacyDialog.tsx
+++ b/react/features/chat/components/web/ChatPrivacyDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import { AbstractChatPrivacyDialog, _mapDispatchToProps, _mapStateToProps } from '../AbstractChatPrivacyDialog';
diff --git a/react/features/chat/components/web/DisplayNameForm.tsx b/react/features/chat/components/web/DisplayNameForm.tsx
index 2c2c637da3..522ab426cd 100644
--- a/react/features/chat/components/web/DisplayNameForm.tsx
+++ b/react/features/chat/components/web/DisplayNameForm.tsx
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IStore } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import { updateSettings } from '../../../base/settings/actions';
import Button from '../../../base/ui/components/web/Button';
import Input from '../../../base/ui/components/web/Input';
diff --git a/react/features/chat/components/web/MessageRecipient.tsx b/react/features/chat/components/web/MessageRecipient.tsx
index ccf9e00354..3433868d40 100644
--- a/react/features/chat/components/web/MessageRecipient.tsx
+++ b/react/features/chat/components/web/MessageRecipient.tsx
@@ -1,10 +1,10 @@
import { Theme } from '@mui/material';
import { withStyles } from '@mui/styles';
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
import { IconCloseLarge } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
import { withPixelLineHeight } from '../../../base/styles/functions.web';
import Button from '../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants.any';
diff --git a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
index 474f7d088e..1f8063b465 100644
--- a/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
+++ b/react/features/chrome-extension-banner/components/ChromeExtensionBanner.web.js
@@ -2,6 +2,7 @@
import { jitsiLocalStorage } from '@jitsi/js-utils';
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import {
createChromeExtensionBannerEvent,
@@ -15,7 +16,6 @@ import {
import { translate } from '../../base/i18n';
import { Icon, IconCloseLarge } from '../../base/icons';
import { browser } from '../../base/lib-jitsi-meet';
-import { connect } from '../../base/redux';
import { isVpaasMeeting } from '../../jaas/functions';
import logger from '../logger';
diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js
index 377455f623..c17d41632c 100644
--- a/react/features/conference/components/native/Conference.js
+++ b/react/features/conference/components/native/Conference.js
@@ -4,12 +4,12 @@ import { useIsFocused } from '@react-navigation/native';
import React, { useEffect } from 'react';
import { BackHandler, NativeModules, SafeAreaView, View } from 'react-native';
import { withSafeAreaInsets } from 'react-native-safe-area-context';
+import { connect } from 'react-redux';
import { appNavigate } from '../../../app/actions';
import { FULLSCREEN_ENABLED, PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
import { getParticipantCount } from '../../../base/participants';
import { Container, LoadingIndicator, TintedView } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
import { TestConnectionInfo } from '../../../base/testing';
import { isCalendarEnabled } from '../../../calendar-sync/functions.native';
diff --git a/react/features/conference/components/native/InsecureRoomNameLabel.js b/react/features/conference/components/native/InsecureRoomNameLabel.js
index ad40610593..2ce3cd7ec9 100644
--- a/react/features/conference/components/native/InsecureRoomNameLabel.js
+++ b/react/features/conference/components/native/InsecureRoomNameLabel.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { IconWarning } from '../../../base/icons';
import { Label } from '../../../base/label';
-import { connect } from '../../../base/redux';
import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
import styles from './styles';
diff --git a/react/features/conference/components/native/LonelyMeetingExperience.tsx b/react/features/conference/components/native/LonelyMeetingExperience.tsx
index 5dffe3240a..470a2ceceb 100644
--- a/react/features/conference/components/native/LonelyMeetingExperience.tsx
+++ b/react/features/conference/components/native/LonelyMeetingExperience.tsx
@@ -3,6 +3,7 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
// @ts-ignore
@@ -11,7 +12,6 @@ import { translate } from '../../../base/i18n/functions';
// @ts-ignore
import { Icon, IconAddUser } from '../../../base/icons';
import { getParticipantCountWithFake } from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
import Button from '../../../base/ui/components/native/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants.native';
import { isInBreakoutRoom } from '../../../breakout-rooms/functions';
@@ -145,8 +145,8 @@ function _mapStateToProps(state: IReduxState) {
return {
_inviteOthersControl,
_isInBreakoutRoom,
- _isInviteFunctionsDisabled: !flag || disableInviteFunctions,
- _isLonelyMeeting: conference && getParticipantCountWithFake(state) === 1
+ _isInviteFunctionsDisabled: Boolean(!flag || disableInviteFunctions),
+ _isLonelyMeeting: Boolean(conference && getParticipantCountWithFake(state) === 1)
};
}
diff --git a/react/features/conference/components/native/TitleBar.js b/react/features/conference/components/native/TitleBar.js
index ba2af92bf5..dc7ce1143c 100644
--- a/react/features/conference/components/native/TitleBar.js
+++ b/react/features/conference/components/native/TitleBar.js
@@ -2,10 +2,10 @@
import React from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { getConferenceName, getConferenceTimestamp } from '../../../base/conference/functions';
import { CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED, getFeatureFlag } from '../../../base/flags';
-import { connect } from '../../../base/redux';
import AudioDeviceToggleButton from '../../../mobile/audio-mode/components/AudioDeviceToggleButton';
import { PictureInPictureButton } from '../../../mobile/picture-in-picture';
import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
diff --git a/react/features/conference/components/native/carmode/TitleBar.tsx b/react/features/conference/components/native/carmode/TitleBar.tsx
index f0004ab221..d0a282bec3 100644
--- a/react/features/conference/components/native/carmode/TitleBar.tsx
+++ b/react/features/conference/components/native/carmode/TitleBar.tsx
@@ -2,7 +2,7 @@
import React from 'react';
import { StyleProp, Text, View, ViewStyle } from 'react-native';
-import { useSelector } from 'react-redux';
+import { connect, useSelector } from 'react-redux';
import { IReduxState } from '../../../../app/types';
import { getConferenceName } from '../../../../base/conference/functions';
@@ -10,7 +10,6 @@ import { MEETING_NAME_ENABLED } from '../../../../base/flags/constants';
import { getFeatureFlag } from '../../../../base/flags/functions';
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
import { getLocalParticipant } from '../../../../base/participants/functions';
-import { connect } from '../../../../base/redux/functions';
// @ts-ignore
import ConnectionIndicator from '../../../../connection-indicator/components/native/ConnectionIndicator';
// @ts-ignore
diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.js
index 2989da03ae..c6db64e70e 100644
--- a/react/features/conference/components/web/Conference.js
+++ b/react/features/conference/components/web/Conference.js
@@ -2,13 +2,13 @@
import _ from 'lodash';
import React from 'react';
+import { connect as reactReduxConnect } from 'react-redux';
import VideoLayout from '../../../../../modules/UI/videolayout/VideoLayout';
import { getConferenceNameForTitle } from '../../../base/conference';
import { connect, disconnect } from '../../../base/connection';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
-import { connect as reactReduxConnect } from '../../../base/redux';
import { setColorAlpha } from '../../../base/util';
import { Chat } from '../../../chat';
import { MainFilmstrip, ScreenshareFilmstrip, StageFilmstrip } from '../../../filmstrip';
diff --git a/react/features/conference/components/web/ConferenceInfo.js b/react/features/conference/components/web/ConferenceInfo.js
index 77313067d0..bf35071014 100644
--- a/react/features/conference/components/web/ConferenceInfo.js
+++ b/react/features/conference/components/web/ConferenceInfo.js
@@ -3,9 +3,9 @@
/* eslint-disable react/no-multi-comp */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
-import { connect } from '../../../base/redux';
import E2EELabel from '../../../e2ee/components/E2EELabel';
import HighlightButton from '../../../recording/components/Recording/web/HighlightButton';
import RecordingLabel from '../../../recording/components/web/RecordingLabel';
diff --git a/react/features/conference/components/web/Notice.js b/react/features/conference/components/web/Notice.js
index eafa586569..77620e22af 100644
--- a/react/features/conference/components/web/Notice.js
+++ b/react/features/conference/components/web/Notice.js
@@ -1,9 +1,9 @@
/* @flow */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
declare var config: Object;
diff --git a/react/features/connection-indicator/components/native/ConnectionIndicator.tsx b/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
index 913560f28f..23c32677ce 100644
--- a/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
+++ b/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
@@ -2,6 +2,7 @@
import React from 'react';
import { StyleProp, View, ViewStyle } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { IconConnection } from '../../../base/icons/svg';
@@ -13,7 +14,6 @@ import {
} from '../../../base/participants/functions';
// @ts-ignore
import BaseIndicator from '../../../base/react/components/native/BaseIndicator';
-import { connect } from '../../../base/redux/functions';
import {
getTrackByMediaTypeAndParticipant
} from '../../../base/tracks/functions.native';
diff --git a/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js b/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js
index 0081e2cf02..86ffb03593 100644
--- a/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js
+++ b/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js
@@ -1,12 +1,12 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../../base/i18n';
import { MEDIA_TYPE } from '../../../base/media';
import { getLocalParticipant, getParticipantById, isScreenShareParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import {
getTrackByMediaTypeAndParticipant,
getVirtualScreenshareParticipantTrack
diff --git a/react/features/deep-linking/components/NoMobileApp.web.js b/react/features/deep-linking/components/NoMobileApp.web.js
index 2c266f82c2..0a9a919df6 100644
--- a/react/features/deep-linking/components/NoMobileApp.web.js
+++ b/react/features/deep-linking/components/NoMobileApp.web.js
@@ -1,10 +1,10 @@
/* @flow */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics';
import { IDeeplinkingConfig } from '../../base/config/configType';
-import { connect } from '../../base/redux';
/**
diff --git a/react/features/desktop-picker/components/DesktopPicker.tsx b/react/features/desktop-picker/components/DesktopPicker.tsx
index f8741d4b6e..4d223e4cf0 100644
--- a/react/features/desktop-picker/components/DesktopPicker.tsx
+++ b/react/features/desktop-picker/components/DesktopPicker.tsx
@@ -1,10 +1,10 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IStore } from '../../app/types';
import { hideDialog } from '../../base/dialog/actions';
import { translate } from '../../base/i18n/functions';
-import { connect } from '../../base/redux/functions';
import Dialog from '../../base/ui/components/web/Dialog';
import Tabs from '../../base/ui/components/web/Tabs';
// eslint-disable-next-line lines-around-comment
diff --git a/react/features/display-name/components/native/DisplayNameLabel.tsx b/react/features/display-name/components/native/DisplayNameLabel.tsx
index 3d625676a8..d0f4648a11 100644
--- a/react/features/display-name/components/native/DisplayNameLabel.tsx
+++ b/react/features/display-name/components/native/DisplayNameLabel.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import {
@@ -7,7 +8,6 @@ import {
getParticipantDisplayName,
isScreenShareParticipant
} from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
// @ts-ignore
import styles from './styles';
@@ -73,8 +73,8 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
return {
_participantName: getParticipantDisplayName(state, ownProps.participantId ?? ''),
- _render: participant && (!participant?.local || ownProps.contained)
- && (!participant?.fakeParticipant || isScreenShareParticipant(participant))
+ _render: Boolean(participant && (!participant?.local || ownProps.contained)
+ && (!participant?.fakeParticipant || isScreenShareParticipant(participant)))
};
}
diff --git a/react/features/display-name/components/native/DisplayNamePrompt.js b/react/features/display-name/components/native/DisplayNamePrompt.js
index 496334e834..3282762e54 100644
--- a/react/features/display-name/components/native/DisplayNamePrompt.js
+++ b/react/features/display-name/components/native/DisplayNamePrompt.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { InputDialog } from '../../../base/dialog';
-import { connect } from '../../../base/redux';
import AbstractDisplayNamePrompt from '../AbstractDisplayNamePrompt';
/**
diff --git a/react/features/display-name/components/web/DisplayNamePrompt.tsx b/react/features/display-name/components/web/DisplayNamePrompt.tsx
index 1bbd5c6597..35de5c6dec 100644
--- a/react/features/display-name/components/web/DisplayNamePrompt.tsx
+++ b/react/features/display-name/components/web/DisplayNamePrompt.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Input from '../../../base/ui/components/web/Input';
import AbstractDisplayNamePrompt, { IProps } from '../AbstractDisplayNamePrompt';
diff --git a/react/features/dynamic-branding/components/native/BrandingImageBackground.tsx b/react/features/dynamic-branding/components/native/BrandingImageBackground.tsx
index 3519d66960..7400499133 100644
--- a/react/features/dynamic-branding/components/native/BrandingImageBackground.tsx
+++ b/react/features/dynamic-branding/components/native/BrandingImageBackground.tsx
@@ -1,9 +1,9 @@
import React from 'react';
import { Image, ImageStyle, StyleProp, ViewStyle } from 'react-native';
import { SvgUri } from 'react-native-svg';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
import styles from './styles';
diff --git a/react/features/e2ee/components/E2EESection.tsx b/react/features/e2ee/components/E2EESection.tsx
index 3e4d7b3c03..71a4fd63fa 100644
--- a/react/features/e2ee/components/E2EESection.tsx
+++ b/react/features/e2ee/components/E2EESection.tsx
@@ -1,11 +1,11 @@
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { createE2EEEvent } from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
import { IReduxState, IStore } from '../../app/types';
import { translate } from '../../base/i18n/functions';
-import { connect } from '../../base/redux/functions';
import Switch from '../../base/ui/components/web/Switch';
import { toggleE2EE } from '../actions';
import { MAX_MODE } from '../constants';
@@ -16,7 +16,7 @@ interface IProps extends WithTranslation {
/**
* The resource for the description, computed based on the maxMode and whether the switch is toggled or not.
*/
- _descriptionResource: string;
+ _descriptionResource?: string;
/**
* Custom e2ee labels.
@@ -100,7 +100,7 @@ class E2EESection extends Component<IProps, IState> {
render() {
const { _descriptionResource, _enabled, _e2eeLabels, _everyoneSupportE2EE, t } = this.props;
const { toggled } = this.state;
- const description = _e2eeLabels?.description || t(_descriptionResource);
+ const description = _e2eeLabels?.description || t(_descriptionResource ?? '');
const label = _e2eeLabels?.label || t('dialog.e2eeLabel');
const warning = _e2eeLabels?.warning || t('dialog.e2eeWarning');
@@ -176,7 +176,7 @@ function mapStateToProps(state: IReduxState) {
_e2eeLabels: e2eeLabels,
_enabled: maxMode === MAX_MODE.DISABLED || e2eeEnabled,
_toggled: e2eeEnabled,
- _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
+ _everyoneSupportE2EE: Boolean(doesEveryoneSupportE2EE(state))
};
}
diff --git a/react/features/e2ee/components/ParticipantVerificationDialog.tsx b/react/features/e2ee/components/ParticipantVerificationDialog.tsx
index dfad1d35dd..8a6bd69465 100644
--- a/react/features/e2ee/components/ParticipantVerificationDialog.tsx
+++ b/react/features/e2ee/components/ParticipantVerificationDialog.tsx
@@ -1,11 +1,11 @@
import { withStyles } from '@mui/styles';
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState, IStore } from '../../app/types';
import { translate } from '../../base/i18n/functions';
import { getParticipantById } from '../../base/participants/functions';
-import { connect } from '../../base/redux/functions';
import Dialog from '../../base/ui/components/web/Dialog';
import { participantVerified } from '../actions';
import { ISas } from '../reducer';
@@ -16,7 +16,7 @@ interface IProps extends WithTranslation {
dispatch: IStore['dispatch'];
emoji: string;
pId: string;
- participantName: string;
+ participantName?: string;
sas: ISas;
}
@@ -31,7 +31,7 @@ const styles = () => {
return {
container: {
display: 'flex',
- flexDirection: 'column',
+ flexDirection: 'column' as const,
margin: '16px'
},
row: {
@@ -39,7 +39,7 @@ const styles = () => {
display: 'flex'
},
item: {
- textAlign: 'center',
+ textAlign: 'center' as const,
margin: '16px'
},
emoji: {
@@ -161,6 +161,4 @@ export function _mapStateToProps(state: IReduxState, ownProps: IProps) {
}
export default translate(connect(_mapStateToProps)(
-
- // @ts-ignore
withStyles(styles)(ParticipantVerificationDialog)));
diff --git a/react/features/embed-meeting/components/EmbedMeetingButton.js b/react/features/embed-meeting/components/EmbedMeetingButton.js
index f2ce7d22f0..a2fa9c851d 100644
--- a/react/features/embed-meeting/components/EmbedMeetingButton.js
+++ b/react/features/embed-meeting/components/EmbedMeetingButton.js
@@ -1,10 +1,11 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { openDialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
import { IconCode } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import EmbedMeetingDialog from './EmbedMeetingDialog';
diff --git a/react/features/etherpad/components/SharedDocumentButton.native.js b/react/features/etherpad/components/SharedDocumentButton.native.js
index d090079858..17322ceca1 100644
--- a/react/features/etherpad/components/SharedDocumentButton.native.js
+++ b/react/features/etherpad/components/SharedDocumentButton.native.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import { IconShareDoc } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { navigate } from '../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../../mobile/navigation/routes';
diff --git a/react/features/etherpad/components/SharedDocumentButton.web.js b/react/features/etherpad/components/SharedDocumentButton.web.js
index e9871327c7..ff200526a8 100644
--- a/react/features/etherpad/components/SharedDocumentButton.web.js
+++ b/react/features/etherpad/components/SharedDocumentButton.web.js
@@ -1,11 +1,11 @@
// @flow
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import { IconShareDoc } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { toggleDocument } from '../../etherpad/actions';
import { setOverflowMenuVisible } from '../../toolbox/actions.web';
diff --git a/react/features/etherpad/components/native/SharedDocument.js b/react/features/etherpad/components/native/SharedDocument.js
index 1b6efa8c36..d87af7ee68 100644
--- a/react/features/etherpad/components/native/SharedDocument.js
+++ b/react/features/etherpad/components/native/SharedDocument.js
@@ -1,11 +1,11 @@
import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { WebView } from 'react-native-webview';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
import { LoadingIndicator } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { getSharedDocumentUrl } from '../../functions';
import styles, { INDICATOR_COLOR } from './styles';
diff --git a/react/features/feedback/components/FeedbackButton.web.js b/react/features/feedback/components/FeedbackButton.web.js
index f8bf191d9b..987f317fd7 100644
--- a/react/features/feedback/components/FeedbackButton.web.js
+++ b/react/features/feedback/components/FeedbackButton.web.js
@@ -1,10 +1,11 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import { IconFeedback } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { openFeedbackDialog } from '../actions';
@@ -16,7 +17,7 @@ type Props = AbstractButtonProps & {
/**
* The {@code JitsiConference} for the current conference.
*/
- _conference: Object,
+ _conference: Object,
/**
* The redux {@code dispatch} function.
diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.js
index 8243c35f40..1ac9d7c248 100644
--- a/react/features/filmstrip/components/native/Filmstrip.js
+++ b/react/features/filmstrip/components/native/Filmstrip.js
@@ -3,10 +3,10 @@
import React, { PureComponent } from 'react';
import { FlatList } from 'react-native';
import { SafeAreaView, withSafeAreaInsets } from 'react-native-safe-area-context';
+import { connect } from 'react-redux';
import { getLocalParticipant } from '../../../base/participants';
import { Platform } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
import { getHideSelfView } from '../../../base/settings/functions.any';
import { isToolboxVisible } from '../../../toolbox/functions';
diff --git a/react/features/filmstrip/components/native/RaisedHandIndicator.js b/react/features/filmstrip/components/native/RaisedHandIndicator.js
index 07657d34c7..3b0f9ed348 100644
--- a/react/features/filmstrip/components/native/RaisedHandIndicator.js
+++ b/react/features/filmstrip/components/native/RaisedHandIndicator.js
@@ -2,10 +2,10 @@
import React from 'react';
import { View } from 'react-native';
+import { connect } from 'react-redux';
import { IconRaiseHand } from '../../../base/icons';
import { BaseIndicator } from '../../../base/react';
-import { connect } from '../../../base/redux';
import AbstractRaisedHandIndicator, {
type Props as AbstractProps,
_mapStateToProps
diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.js
index d9a4e7d92f..7764108e17 100644
--- a/react/features/filmstrip/components/native/Thumbnail.js
+++ b/react/features/filmstrip/components/native/Thumbnail.js
@@ -1,5 +1,6 @@
import React, { PureComponent } from 'react';
import { Image, View } from 'react-native';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
@@ -17,7 +18,6 @@ import {
import ParticipantView from '../../../base/participants/components/ParticipantView.native';
import { FakeParticipant } from '../../../base/participants/types';
import { Container } from '../../../base/react';
-import { connect } from '../../../base/redux';
import {
getTrackByMediaTypeAndParticipant,
getVideoTrackByParticipant,
diff --git a/react/features/filmstrip/components/native/TileView.js b/react/features/filmstrip/components/native/TileView.js
index 55ac35a1a3..2f944e5a8e 100644
--- a/react/features/filmstrip/components/native/TileView.js
+++ b/react/features/filmstrip/components/native/TileView.js
@@ -7,10 +7,10 @@ import {
TouchableWithoutFeedback
} from 'react-native';
import { withSafeAreaInsets } from 'react-native-safe-area-context';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { getLocalParticipant, getParticipantCountWithFake } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { getHideSelfView } from '../../../base/settings/functions.any';
import { setVisibleRemoteParticipants } from '../../actions.web';
diff --git a/react/features/filmstrip/components/web/AudioTracksContainer.js b/react/features/filmstrip/components/web/AudioTracksContainer.js
index 4be6fd306d..951f71b9a7 100644
--- a/react/features/filmstrip/components/web/AudioTracksContainer.js
+++ b/react/features/filmstrip/components/web/AudioTracksContainer.js
@@ -1,8 +1,8 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
import { AudioTrack, MEDIA_TYPE } from '../../../base/media';
-import { connect } from '../../../base/redux';
/**
* The type of the React {@code Component} props of {@link AudioTracksContainer}.
diff --git a/react/features/filmstrip/components/web/Filmstrip.tsx b/react/features/filmstrip/components/web/Filmstrip.tsx
index 0eb55d0785..19f3889041 100644
--- a/react/features/filmstrip/components/web/Filmstrip.tsx
+++ b/react/features/filmstrip/components/web/Filmstrip.tsx
@@ -3,6 +3,7 @@ import clsx from 'clsx';
import _ from 'lodash';
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { FixedSizeGrid, FixedSizeList } from 'react-window';
import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
@@ -13,7 +14,6 @@ import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon';
import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
import { getHideSelfView } from '../../../base/settings/functions.any';
import { showToolbox } from '../../../toolbox/actions.web';
import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';
@@ -67,7 +67,7 @@ interface IProps extends WithTranslation {
/**
* The current layout of the filmstrip.
*/
- _currentLayout: string;
+ _currentLayout?: string;
/**
* Whether or not to hide the self view.
@@ -167,7 +167,7 @@ interface IProps extends WithTranslation {
/**
* The height of the top panel (user resized).
*/
- _topPanelHeight?: number;
+ _topPanelHeight?: number | null;
/**
* The max height of the top panel.
@@ -182,7 +182,7 @@ interface IProps extends WithTranslation {
/**
* The width of the vertical filmstrip (user resized).
*/
- _verticalFilmstripWidth?: number;
+ _verticalFilmstripWidth?: number | null;
/**
* Whether or not the vertical filmstrip should have a background color.
@@ -922,7 +922,7 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
_mainFilmstripVisible: visible,
_maxFilmstripWidth: clientWidth - MIN_STAGE_VIEW_WIDTH,
_maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT,
- _remoteParticipantsLength: _remoteParticipants?.length,
+ _remoteParticipantsLength: _remoteParticipants?.length ?? 0,
_topPanelHeight: topPanelHeight.current,
_topPanelMaxHeight: topPanelHeight.current || TOP_FILMSTRIP_HEIGHT,
_topPanelVisible,
diff --git a/react/features/filmstrip/components/web/MainFilmstrip.js b/react/features/filmstrip/components/web/MainFilmstrip.js
index ac31a6683e..46e70b4f96 100644
--- a/react/features/filmstrip/components/web/MainFilmstrip.js
+++ b/react/features/filmstrip/components/web/MainFilmstrip.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { getToolbarButtons } from '../../../base/config';
import { isMobileBrowser } from '../../../base/environment/utils';
-import { connect } from '../../../base/redux';
import { LAYOUTS, getCurrentLayout } from '../../../video-layout';
import {
ASPECT_RATIO_BREAKPOINT,
diff --git a/react/features/filmstrip/components/web/ScreenshareFilmstrip.js b/react/features/filmstrip/components/web/ScreenshareFilmstrip.js
index 2fa5450980..ffee8ccf3a 100644
--- a/react/features/filmstrip/components/web/ScreenshareFilmstrip.js
+++ b/react/features/filmstrip/components/web/ScreenshareFilmstrip.js
@@ -1,7 +1,7 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../base/redux';
import { LAYOUTS, LAYOUT_CLASSNAMES, getCurrentLayout } from '../../../video-layout';
import {
FILMSTRIP_TYPE
diff --git a/react/features/filmstrip/components/web/StageFilmstrip.js b/react/features/filmstrip/components/web/StageFilmstrip.js
index ef588d0266..9e12fcc174 100644
--- a/react/features/filmstrip/components/web/StageFilmstrip.js
+++ b/react/features/filmstrip/components/web/StageFilmstrip.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { getToolbarButtons } from '../../../base/config';
import { isMobileBrowser } from '../../../base/environment/utils';
-import { connect } from '../../../base/redux';
import { LAYOUTS, LAYOUT_CLASSNAMES, getCurrentLayout } from '../../../video-layout';
import {
ASPECT_RATIO_BREAKPOINT,
diff --git a/react/features/filmstrip/components/web/StatusIndicators.js b/react/features/filmstrip/components/web/StatusIndicators.js
index aa2e91384d..b11304f008 100644
--- a/react/features/filmstrip/components/web/StatusIndicators.js
+++ b/react/features/filmstrip/components/web/StatusIndicators.js
@@ -1,6 +1,7 @@
/* @flow */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { MEDIA_TYPE } from '../../../base/media';
import {
@@ -8,7 +9,6 @@ import {
getParticipantByIdOrUndefined,
isScreenShareParticipantById
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import {
getVideoTrackByParticipant,
isLocalTrackMuted,
diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
index f938838069..addcca3b93 100644
--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js
@@ -6,6 +6,7 @@ import {
TouchableOpacity,
View
} from 'react-native';
+import { connect } from 'react-redux';
import { AlertDialog, openDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
@@ -19,7 +20,6 @@ import {
} from '../../../../base/icons';
import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
import { AvatarListItem, type Item } from '../../../../base/react';
-import { connect } from '../../../../base/redux';
import BaseTheme from '../../../../base/ui/components/BaseTheme.native';
import Input from '../../../../base/ui/components/native/Input';
import HeaderNavigationButton
diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
index 508e47a052..434386eb83 100644
--- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
+++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
@@ -1,6 +1,7 @@
/* eslint-disable lines-around-comment */
import React, { useEffect } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { createInviteDialogEvent } from '../../../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../../../analytics/functions';
@@ -8,7 +9,6 @@ import { IReduxState } from '../../../../app/types';
import { getInviteURL } from '../../../../base/connection/functions';
import { translate } from '../../../../base/i18n/functions';
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
-import { connect } from '../../../../base/redux/functions';
import Dialog from '../../../../base/ui/components/web/Dialog';
import { StatusCode } from '../../../../base/util/uri';
import { isDynamicBrandingDataLoaded } from '../../../../dynamic-branding/functions.any';
@@ -68,7 +68,7 @@ interface IProps extends WithTranslation {
/**
* An alternate app name to be displayed in the email subject.
*/
- _inviteAppName?: string;
+ _inviteAppName?: string | null;
/**
* Whether or not invite contacts should be visible.
@@ -88,12 +88,12 @@ interface IProps extends WithTranslation {
/**
* The current known URL for a live stream in progress.
*/
- _liveStreamViewURL: string;
+ _liveStreamViewURL?: string;
/**
* The default phone number.
*/
- _phoneNumber?: string;
+ _phoneNumber?: string | null;
/**
* Whether or not url sharing button should be visible.
diff --git a/react/features/invite/components/add-people-dialog/web/InviteButton.js b/react/features/invite/components/add-people-dialog/web/InviteButton.js
index 40e5e901a1..444c4b402e 100644
--- a/react/features/invite/components/add-people-dialog/web/InviteButton.js
+++ b/react/features/invite/components/add-people-dialog/web/InviteButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../../analytics';
import { translate } from '../../../../base/i18n';
import { IconAddUser } from '../../../../base/icons';
-import { connect } from '../../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components';
import { beginAddPeople } from '../../../actions.any';
diff --git a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
index 67b8e6ebd3..3bf90dc060 100644
--- a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
+++ b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
@@ -2,13 +2,13 @@
import InlineMessage from '@atlaskit/inline-message';
import React from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { Avatar } from '../../../../base/avatar';
import { translate } from '../../../../base/i18n';
import { Icon, IconPhoneRinging } from '../../../../base/icons';
import { MultiSelectAutocomplete } from '../../../../base/react';
-import { connect } from '../../../../base/redux';
import { isVpaasMeeting } from '../../../../jaas/functions';
import { hideAddPeopleDialog } from '../../../actions';
import { INVITE_TYPES } from '../../../constants';
diff --git a/react/features/invite/components/callee-info/CalleeInfo.js b/react/features/invite/components/callee-info/CalleeInfo.js
index be56bbe6e8..15f368475e 100644
--- a/react/features/invite/components/callee-info/CalleeInfo.js
+++ b/react/features/invite/components/callee-info/CalleeInfo.js
@@ -1,6 +1,7 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { MEDIA_TYPE } from '../../../base/media';
@@ -10,7 +11,6 @@ import {
getRemoteParticipants
} from '../../../base/participants';
import { Container, Text } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { isLocalTrackMuted } from '../../../base/tracks';
import { CALLING, PresenceLabel } from '../../../presence-status';
diff --git a/react/features/invite/components/callee-info/CalleeInfoContainer.js b/react/features/invite/components/callee-info/CalleeInfoContainer.js
index fdf6060bbe..b10dd1007d 100644
--- a/react/features/invite/components/callee-info/CalleeInfoContainer.js
+++ b/react/features/invite/components/callee-info/CalleeInfoContainer.js
@@ -1,8 +1,7 @@
// @flow
import React, { Component } from 'react';
-
-import { connect } from '../../../base/redux';
+import { connect } from 'react-redux';
import CalleeInfo from './CalleeInfo';
@@ -49,7 +48,7 @@ class CalleeInfoContainer extends Component<Props> {
* _calleeInfoVisible: boolean
* }}
*/
-function _mapStateToProps(state: Object): Object {
+function _mapStateToProps(state: Object) {
return {
/**
* The indicator which determines whether {@code CalleeInfo} is to be
diff --git a/react/features/invite/components/dial-in-summary/native/DialInSummary.js b/react/features/invite/components/dial-in-summary/native/DialInSummary.js
index defa85a405..bcb621fea2 100644
--- a/react/features/invite/components/dial-in-summary/native/DialInSummary.js
+++ b/react/features/invite/components/dial-in-summary/native/DialInSummary.js
@@ -3,13 +3,13 @@
import React, { PureComponent } from 'react';
import { Linking, View } from 'react-native';
import { WebView } from 'react-native-webview';
+import { connect } from 'react-redux';
import { type Dispatch } from 'redux';
import { openDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
import { LoadingIndicator } from '../../../../base/react';
-import { connect } from '../../../../base/redux';
import { getDialInfoPageURLForURIString } from '../../../functions';
import DialInSummaryErrorDialog from './DialInSummaryErrorDialog';
diff --git a/react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js b/react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js
index 25aea782d0..eb5c5d9889 100644
--- a/react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js
+++ b/react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { AlertDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
/**
* Dialog to inform the user that we couldn't fetch the dial-in info page.
diff --git a/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.js b/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.js
index 1252978c77..66aceadbce 100644
--- a/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.js
+++ b/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { translate } from '../../../base/i18n';
import { IconShortcuts } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { openSettingsDialog } from '../../../settings/actions';
import { SETTINGS_TABS } from '../../../settings/constants';
diff --git a/react/features/large-video/components/LargeVideo.native.js b/react/features/large-video/components/LargeVideo.native.js
index 987571f90d..424d7528f2 100644
--- a/react/features/large-video/components/LargeVideo.native.js
+++ b/react/features/large-video/components/LargeVideo.native.js
@@ -1,12 +1,12 @@
// @flow
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { JitsiTrackEvents } from '../../base/lib-jitsi-meet';
import ParticipantView from '../../base/participants/components/ParticipantView.native';
import { getParticipantById, isLocalScreenshareParticipant } from '../../base/participants/functions';
-import { connect } from '../../base/redux';
import {
getVideoTrackByParticipant,
isLocalVideoTrackDesktop,
diff --git a/react/features/large-video/components/LargeVideo.web.js b/react/features/large-video/components/LargeVideo.web.js
index 4e4f9ef46c..1a331cbb37 100644
--- a/react/features/large-video/components/LargeVideo.web.js
+++ b/react/features/large-video/components/LargeVideo.web.js
@@ -1,12 +1,12 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import VideoLayout from '../../../../modules/UI/videolayout/VideoLayout';
import { VIDEO_TYPE } from '../../base/media';
import { getLocalParticipant } from '../../base/participants';
import { Watermarks } from '../../base/react';
-import { connect } from '../../base/redux';
import { getHideSelfView } from '../../base/settings/functions.any';
import { getVideoTrackByParticipant } from '../../base/tracks';
import { setColorAlpha } from '../../base/util';
diff --git a/react/features/large-video/components/LargeVideoBackground.web.js b/react/features/large-video/components/LargeVideoBackground.web.js
index f7dce643ad..ba7a9b40e9 100644
--- a/react/features/large-video/components/LargeVideoBackground.web.js
+++ b/react/features/large-video/components/LargeVideoBackground.web.js
@@ -1,8 +1,8 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../base/redux';
import { shouldDisplayTileView } from '../../video-layout';
/**
@@ -24,7 +24,7 @@ export const ORIENTATION = {
*/
type Props = {
- /**
+ /**
* Whether or not the layout should change to support tile view mode.
*
* @protected
@@ -230,17 +230,17 @@ export class LargeVideoBackground extends Component<Props> {
height: canvasHeight,
width: canvasWidth
} = this._canvasEl;
- const cavnasContext = this._canvasEl.getContext('2d');
+ const canvasContext = this._canvasEl.getContext('2d');
if (this.props.orientationFit === ORIENTATION.LANDSCAPE) {
const heightScaledToFit = (canvasWidth / videoWidth) * videoHeight;
- cavnasContext.drawImage(
+ canvasContext.drawImage(
videoElement, 0, 0, canvasWidth, heightScaledToFit);
} else {
const widthScaledToFit = (canvasHeight / videoHeight) * videoWidth;
- cavnasContext.drawImage(
+ canvasContext.drawImage(
videoElement, 0, 0, widthScaledToFit, canvasHeight);
}
}
diff --git a/react/features/lobby/components/AbstractLobbyScreen.js b/react/features/lobby/components/AbstractLobbyScreen.js
index 1c1a5e15b4..1e4c46607a 100644
--- a/react/features/lobby/components/AbstractLobbyScreen.js
+++ b/react/features/lobby/components/AbstractLobbyScreen.js
@@ -437,7 +437,7 @@ export default class AbstractLobbyScreen<P: Props = Props> extends PureComponent
* @param {Object} state - The Redux state.
* @returns {Props}
*/
-export function _mapStateToProps(state: Object): $Shape<Props> {
+export function _mapStateToProps(state: Object) {
const localParticipant = getLocalParticipant(state);
const participantId = localParticipant?.id;
const inviteEnabledFlag = getFeatureFlag(state, INVITE_ENABLED, true);
diff --git a/react/features/lobby/components/native/LobbyChatScreen.js b/react/features/lobby/components/native/LobbyChatScreen.js
index 739b66ae74..a476f5cb4f 100644
--- a/react/features/lobby/components/native/LobbyChatScreen.js
+++ b/react/features/lobby/components/native/LobbyChatScreen.js
@@ -1,8 +1,8 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
-import { connect } from '../../../base/redux';
import ChatInputBar from '../../../chat/components/native/ChatInputBar';
import MessageContainer from '../../../chat/components/native/MessageContainer';
import AbstractLobbyScreen, {
diff --git a/react/features/lobby/components/native/LobbyScreen.js b/react/features/lobby/components/native/LobbyScreen.js
index 91302baa1a..3191c34c5f 100644
--- a/react/features/lobby/components/native/LobbyScreen.js
+++ b/react/features/lobby/components/native/LobbyScreen.js
@@ -1,11 +1,11 @@
import React, { ReactElement } from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { getConferenceName } from '../../../base/conference/functions';
import { translate } from '../../../base/i18n';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
import { LoadingIndicator } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui';
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import Button from '../../../base/ui/components/native/Button';
diff --git a/react/features/lobby/components/web/LobbyScreen.js b/react/features/lobby/components/web/LobbyScreen.js
index aac10d2709..55ea3a319f 100644
--- a/react/features/lobby/components/web/LobbyScreen.js
+++ b/react/features/lobby/components/web/LobbyScreen.js
@@ -1,12 +1,12 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { Icon, IconCloseLarge } from '../../../base/icons';
import { PreMeetingScreen } from '../../../base/premeeting';
import { LoadingIndicator } from '../../../base/react';
-import { connect } from '../../../base/redux';
import Button from '../../../base/ui/components/web/Button';
import Input from '../../../base/ui/components/web/Input';
import ChatInput from '../../../chat/components/web/ChatInput';
diff --git a/react/features/lobby/components/web/LobbySection.tsx b/react/features/lobby/components/web/LobbySection.tsx
index 3ccb4bbf6b..2f680cfcc2 100644
--- a/react/features/lobby/components/web/LobbySection.tsx
+++ b/react/features/lobby/components/web/LobbySection.tsx
@@ -1,11 +1,11 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { getSecurityUiConfig } from '../../../base/config/functions.any';
import { translate } from '../../../base/i18n/functions';
import { isLocalParticipantModerator } from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
import Switch from '../../../base/ui/components/web/Switch';
import { isInBreakoutRoom } from '../../../breakout-rooms/functions';
import { toggleLobbyMode } from '../../actions';
@@ -125,7 +125,7 @@ class LobbySection extends PureComponent<IProps, IState> {
* @param {Object} state - The Redux state.
* @returns {IProps}
*/
-function mapStateToProps(state: IReduxState): Partial<IProps> {
+function mapStateToProps(state: IReduxState) {
const { conference } = state['features/base/conference'];
const { hideLobbyButton } = getSecurityUiConfig(state);
diff --git a/react/features/mobile/audio-mode/components/AudioDeviceToggleButton.js b/react/features/mobile/audio-mode/components/AudioDeviceToggleButton.js
index 83a6b3d4dd..8a10f41739 100644
--- a/react/features/mobile/audio-mode/components/AudioDeviceToggleButton.js
+++ b/react/features/mobile/audio-mode/components/AudioDeviceToggleButton.js
@@ -1,9 +1,9 @@
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { openSheet } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { IconVolumeUp } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import AudioRoutePickerDialog from './AudioRoutePickerDialog';
diff --git a/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js b/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js
index 6cf3e7c9bb..f65d871725 100644
--- a/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js
+++ b/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js
@@ -1,6 +1,7 @@
import _ from 'lodash';
import React, { Component } from 'react';
import { NativeModules, Text, TouchableHighlight, View } from 'react-native';
+import { connect } from 'react-redux';
import { BottomSheet, hideSheet } from '../../../base/dialog';
import { bottomSheetStyles } from '../../../base/dialog/components/native/styles';
@@ -13,7 +14,6 @@ import {
IconPhoneRinging,
IconVolumeUp
} from '../../../base/icons';
-import { connect } from '../../../base/redux';
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import styles from './styles';
diff --git a/react/features/mobile/navigation/components/RootNavigationContainer.tsx b/react/features/mobile/navigation/components/RootNavigationContainer.tsx
index 2f1f72afe7..a8177eab7c 100644
--- a/react/features/mobile/navigation/components/RootNavigationContainer.tsx
+++ b/react/features/mobile/navigation/components/RootNavigationContainer.tsx
@@ -4,9 +4,9 @@ import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import React, { useCallback } from 'react';
import { StatusBar } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
// @ts-ignore
import DialInSummary from '../../../invite/components/dial-in-summary/native/DialInSummary';
import Prejoin from '../../../prejoin/components/native/Prejoin';
diff --git a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
index e9b281d52b..2199200d6b 100644
--- a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
+++ b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
@@ -1,11 +1,11 @@
// @flow
import { NativeModules, Platform } from 'react-native';
+import { connect } from 'react-redux';
import { PIP_ENABLED, PIP_WHILE_SCREEN_SHARING_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconArrowDown } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalVideoTrackDesktop } from '../../../base/tracks/functions';
import { enterPictureInPicture } from '../actions';
@@ -62,7 +62,7 @@ class PictureInPictureButton extends AbstractButton<Props, *> {
* _enabled: boolean
* }}
*/
-function _mapStateToProps(state): Object {
+function _mapStateToProps(state) {
const pipEnabled = Boolean(getFeatureFlag(state, PIP_ENABLED));
const pipWhileScreenSharingEnabled = getFeatureFlag(state, PIP_WHILE_SCREEN_SHARING_ENABLED, false);
diff --git a/react/features/no-audio-signal/components/DialInLink.js b/react/features/no-audio-signal/components/DialInLink.js
index 2a4e02cb4a..1f733e4dac 100644
--- a/react/features/no-audio-signal/components/DialInLink.js
+++ b/react/features/no-audio-signal/components/DialInLink.js
@@ -1,9 +1,9 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
-import { connect } from '../../base/redux';
import { getDialInfoPageURL, shouldDisplayDialIn } from '../../invite';
/**
diff --git a/react/features/noise-suppression/components/NoiseSuppressionButton.tsx b/react/features/noise-suppression/components/NoiseSuppressionButton.tsx
index cb3ee22856..b3a2fe5b7f 100644
--- a/react/features/noise-suppression/components/NoiseSuppressionButton.tsx
+++ b/react/features/noise-suppression/components/NoiseSuppressionButton.tsx
@@ -1,10 +1,11 @@
+import { connect } from 'react-redux';
+
import { IReduxState } from '../../app/types';
import { translate } from '../../base/i18n/functions';
import {
IconNoiseSuppressionOff,
IconNoiseSuppressionOn
} from '../../base/icons/svg';
-import { connect } from '../../base/redux/functions';
import {
AbstractButton,
type AbstractButtonProps
@@ -69,7 +70,7 @@ class NoiseSuppressionButton extends AbstractButton<Props, any, any> {
* @private
* @returns {Props}
*/
-function _mapStateToProps(state: IReduxState): Object {
+function _mapStateToProps(state: IReduxState) {
return {
_isNoiseSuppressionEnabled: isNoiseSuppressionEnabled(state)
};
diff --git a/react/features/notifications/components/native/NotificationsContainer.tsx b/react/features/notifications/components/native/NotificationsContainer.tsx
index a152562f46..84c7009775 100644
--- a/react/features/notifications/components/native/NotificationsContainer.tsx
+++ b/react/features/notifications/components/native/NotificationsContainer.tsx
@@ -4,9 +4,9 @@ import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
import { Platform } from 'react-native';
import { Edge, SafeAreaView } from 'react-native-safe-area-context';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
import { hideNotification } from '../../actions';
import { areThereNotifications } from '../../functions';
import NotificationsTransition from '../NotificationsTransition';
diff --git a/react/features/notifications/components/web/NotificationsContainer.tsx b/react/features/notifications/components/web/NotificationsContainer.tsx
index 319c32fcfe..7ce93745d3 100644
--- a/react/features/notifications/components/web/NotificationsContainer.tsx
+++ b/react/features/notifications/components/web/NotificationsContainer.tsx
@@ -2,9 +2,9 @@ import { withStyles } from '@mui/styles';
import clsx from 'clsx';
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
import { hideNotification } from '../../actions';
import { areThereNotifications } from '../../functions';
import { INotificationProps } from '../../types';
diff --git a/react/features/overlay/components/web/OverlayContainer.tsx b/react/features/overlay/components/web/OverlayContainer.tsx
index 254b9c4403..9e94624bd8 100644
--- a/react/features/overlay/components/web/OverlayContainer.tsx
+++ b/react/features/overlay/components/web/OverlayContainer.tsx
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
import { getOverlayToRender } from '../../functions.web';
diff --git a/react/features/overlay/components/web/PageReloadOverlay.js b/react/features/overlay/components/web/PageReloadOverlay.js
index 369026b225..4345f568bc 100644
--- a/react/features/overlay/components/web/PageReloadOverlay.js
+++ b/react/features/overlay/components/web/PageReloadOverlay.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import AbstractPageReloadOverlay, {
type Props,
diff --git a/react/features/overlay/components/web/ReloadButton.js b/react/features/overlay/components/web/ReloadButton.js
index effb37fa0d..e705031128 100644
--- a/react/features/overlay/components/web/ReloadButton.js
+++ b/react/features/overlay/components/web/ReloadButton.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { reloadNow } from '../../../app/actions';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
/**
* The type of the React {@code Component} props of {@link ReloadButton}.
@@ -63,7 +63,7 @@ class ReloadButton extends Component<Props> {
* @private
* @returns {Object}
*/
-function _mapDispatchToProps(dispatch: Function): Object {
+function _mapDispatchToProps(dispatch: Function) {
return {
/**
* Dispatches the redux action to reload the page.
diff --git a/react/features/overlay/components/web/UserMediaPermissionsOverlay.js b/react/features/overlay/components/web/UserMediaPermissionsOverlay.js
index 288f52e48b..6bb5582670 100644
--- a/react/features/overlay/components/web/UserMediaPermissionsOverlay.js
+++ b/react/features/overlay/components/web/UserMediaPermissionsOverlay.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate, translateToHTML } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractUserMediaPermissionsOverlay, { abstractMapStateToProps }
from './AbstractUserMediaPermissionsOverlay';
@@ -96,7 +96,7 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {
* @param {Object} ownProps - The props passed to the component.
* @returns {Object}
*/
-function mapStateToProps(state): Object {
+function mapStateToProps(state) {
const { premeetingBackground } = state['features/dynamic-branding'];
return {
diff --git a/react/features/participants-pane/components/native/MeetingParticipantItem.js b/react/features/participants-pane/components/native/MeetingParticipantItem.js
index 0885cb656c..8976922f79 100644
--- a/react/features/participants-pane/components/native/MeetingParticipantItem.js
+++ b/react/features/participants-pane/components/native/MeetingParticipantItem.js
@@ -1,4 +1,5 @@
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import {
@@ -9,7 +10,6 @@ import {
isParticipantModerator
} from '../../../base/participants';
import { FakeParticipant } from '../../../base/participants/types';
-import { connect } from '../../../base/redux';
import {
isParticipantAudioMuted,
isParticipantVideoMuted
diff --git a/react/features/participants-pane/components/native/MeetingParticipantList.tsx b/react/features/participants-pane/components/native/MeetingParticipantList.tsx
index 1f97b09bf6..e13c751385 100644
--- a/react/features/participants-pane/components/native/MeetingParticipantList.tsx
+++ b/react/features/participants-pane/components/native/MeetingParticipantList.tsx
@@ -3,6 +3,7 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
import { FlatList, Text } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
@@ -13,7 +14,6 @@ import {
getParticipantCountWithFake,
getRemoteParticipants
} from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
import Button from '../../../base/ui/components/native/Button';
import Input from '../../../base/ui/components/native/Input';
import { BUTTON_TYPES } from '../../../base/ui/constants.native';
diff --git a/react/features/participants-pane/components/native/ParticipantsPaneButton.js b/react/features/participants-pane/components/native/ParticipantsPaneButton.js
index 8e232db437..40d690376e 100644
--- a/react/features/participants-pane/components/native/ParticipantsPaneButton.js
+++ b/react/features/participants-pane/components/native/ParticipantsPaneButton.js
@@ -1,10 +1,10 @@
// @flow
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../../base/i18n';
import { IconUsers } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { navigate }
from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
diff --git a/react/features/participants-pane/components/native/RoomParticipantMenu.tsx b/react/features/participants-pane/components/native/RoomParticipantMenu.tsx
index 03589200f4..d4b318bb75 100644
--- a/react/features/participants-pane/components/native/RoomParticipantMenu.tsx
+++ b/react/features/participants-pane/components/native/RoomParticipantMenu.tsx
@@ -2,6 +2,7 @@
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
// @ts-ignore
@@ -11,7 +12,6 @@ import { BottomSheet, hideSheet } from '../../../base/dialog';
// @ts-ignore
import { bottomSheetStyles } from '../../../base/dialog/components/native/styles';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import { getBreakoutRooms } from '../../../breakout-rooms/functions';
// @ts-ignore
import SendToBreakoutRoom from '../../../video-menu/components/native/SendToBreakoutRoom';
diff --git a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
index 617971a135..3bd0bb1bdc 100644
--- a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
+++ b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
@@ -1,12 +1,12 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import {
getLocalParticipant,
getParticipantByIdOrUndefined
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import FakeParticipantContextMenu from '../../../video-menu/components/web/FakeParticipantContextMenu';
import ParticipantContextMenu from '../../../video-menu/components/web/ParticipantContextMenu';
@@ -122,7 +122,7 @@ class MeetingParticipantContextMenu extends Component<Props> {
* @private
* @returns {Props}
*/
-function _mapStateToProps(state, ownProps): Object {
+function _mapStateToProps(state, ownProps) {
const { participantID, overflowDrawer, drawerParticipant } = ownProps;
const { ownerId } = state['features/shared-video'];
const localParticipantId = getLocalParticipant(state).id;
diff --git a/react/features/participants-pane/components/web/MeetingParticipantItem.js b/react/features/participants-pane/components/web/MeetingParticipantItem.js
index 27704674a0..ee9e9971ed 100644
--- a/react/features/participants-pane/components/web/MeetingParticipantItem.js
+++ b/react/features/participants-pane/components/web/MeetingParticipantItem.js
@@ -1,6 +1,7 @@
// @flow
import React, { useCallback, useEffect, useState } from 'react';
+import { connect } from 'react-redux';
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
import { MEDIA_TYPE } from '../../../base/media';
@@ -11,7 +12,6 @@ import {
hasRaisedHand,
isParticipantModerator
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import {
getLocalAudioTrack,
getTrackByMediaTypeAndParticipant,
@@ -294,7 +294,7 @@ function MeetingParticipantItem({
* @private
* @returns {Props}
*/
-function _mapStateToProps(state, ownProps): Object {
+function _mapStateToProps(state, ownProps) {
const { participantID, searchString } = ownProps;
const { ownerId } = state['features/shared-video'];
const localParticipantId = getLocalParticipant(state).id;
diff --git a/react/features/participants-pane/components/web/MeetingParticipants.tsx b/react/features/participants-pane/components/web/MeetingParticipants.tsx
index f67d7f6dd8..6e9a3797ab 100644
--- a/react/features/participants-pane/components/web/MeetingParticipants.tsx
+++ b/react/features/participants-pane/components/web/MeetingParticipants.tsx
@@ -1,7 +1,7 @@
/* eslint-disable lines-around-comment */
import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
-import { useDispatch, useSelector } from 'react-redux';
+import { connect, useDispatch, useSelector } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { IReduxState } from '../../../app/types';
@@ -10,7 +10,6 @@ import participantsPaneTheme from '../../../base/components/themes/participantsP
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
import { MEDIA_TYPE } from '../../../base/media/constants';
import { getParticipantById, isScreenShareParticipant } from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
import { withPixelLineHeight } from '../../../base/styles/functions.web';
import Input from '../../../base/ui/components/web/Input';
import useContextMenu from '../../../base/ui/hooks/useContextMenu.web';
@@ -173,7 +172,7 @@ function MeetingParticipants({
* @private
* @returns {IProps}
*/
-function _mapStateToProps(state: IReduxState): Object {
+function _mapStateToProps(state: IReduxState) {
let sortedParticipantIds: any = getSortedParticipantIds(state);
// Filter out the virtual screenshare participants since we do not want them to be displayed as separate
diff --git a/react/features/participants-pane/components/web/ParticipantsPaneButton.js b/react/features/participants-pane/components/web/ParticipantsPaneButton.js
index 47963a817b..2fdc6eb0d8 100644
--- a/react/features/participants-pane/components/web/ParticipantsPaneButton.js
+++ b/react/features/participants-pane/components/web/ParticipantsPaneButton.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconUsers } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import ParticipantsCounter from './ParticipantsCounter';
diff --git a/react/features/prejoin/components/web/Prejoin.tsx b/react/features/prejoin/components/web/Prejoin.tsx
index 466c02be03..6083ad428b 100644
--- a/react/features/prejoin/components/web/Prejoin.tsx
+++ b/react/features/prejoin/components/web/Prejoin.tsx
@@ -1,6 +1,7 @@
import InlineDialog from '@atlaskit/inline-dialog';
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
// eslint-disable-next-line lines-around-comment
@@ -13,7 +14,6 @@ import { isVideoMutedByUser } from '../../../base/media/functions';
import { getLocalParticipant } from '../../../base/participants/functions';
import ActionButton from '../../../base/premeeting/components/web/ActionButton';
import PreMeetingScreen from '../../../base/premeeting/components/web/PreMeetingScreen';
-import { connect } from '../../../base/redux/functions';
import { updateSettings } from '../../../base/settings/actions';
import { getDisplayName } from '../../../base/settings/functions.web';
import { getLocalJitsiVideoTrack } from '../../../base/tracks/functions.web';
@@ -66,7 +66,7 @@ interface IProps extends WithTranslation {
/**
* Whether conference join is in progress.
*/
- joiningInProgress: boolean;
+ joiningInProgress?: boolean;
/**
* The name of the user that is about to join.
@@ -76,7 +76,7 @@ interface IProps extends WithTranslation {
/**
* Local participant id.
*/
- participantId: string;
+ participantId?: string;
/**
* The prejoin config.
diff --git a/react/features/prejoin/components/web/PrejoinThirdParty.js b/react/features/prejoin/components/web/PrejoinThirdParty.js
index 480fa35267..54e84a9641 100644
--- a/react/features/prejoin/components/web/PrejoinThirdParty.js
+++ b/react/features/prejoin/components/web/PrejoinThirdParty.js
@@ -1,11 +1,11 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { isVideoMutedByUser } from '../../../base/media';
import { PreMeetingScreen } from '../../../base/premeeting';
-import { connect } from '../../../base/redux';
import { getLocalJitsiVideoTrack } from '../../../base/tracks';
import { isDeviceStatusVisible } from '../../functions';
@@ -14,7 +14,7 @@ type Props = {
/**
* Indicates the className that needs to be applied.
*/
- className: string,
+ className: string,
/**
* Flag signaling if the device status is visible or not.
@@ -75,7 +75,7 @@ class PrejoinThirdParty extends Component<Props> {
* @param {Object} ownProps - The props passed to the component.
* @returns {Object}
*/
-function mapStateToProps(state): Object {
+function mapStateToProps(state) {
return {
deviceStatusVisible: isDeviceStatusVisible(state),
showCameraPreview: !isVideoMutedByUser(state),
diff --git a/react/features/prejoin/components/web/country-picker/CountryPicker.js b/react/features/prejoin/components/web/country-picker/CountryPicker.js
index 8ef3ee940e..973282ab0e 100644
--- a/react/features/prejoin/components/web/country-picker/CountryPicker.js
+++ b/react/features/prejoin/components/web/country-picker/CountryPicker.js
@@ -2,8 +2,8 @@
import InlineDialog from '@atlaskit/inline-dialog';
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../../base/redux';
import { setDialOutCountry, setDialOutNumber } from '../../../actions.web';
import { getDialOutCountry, getDialOutNumber } from '../../../functions';
import { getCountryFromDialCodeText } from '../../../utils';
diff --git a/react/features/prejoin/components/web/dialogs/JoinByPhoneDialog.js b/react/features/prejoin/components/web/dialogs/JoinByPhoneDialog.js
index 72dfad2a79..6707889684 100644
--- a/react/features/prejoin/components/web/dialogs/JoinByPhoneDialog.js
+++ b/react/features/prejoin/components/web/dialogs/JoinByPhoneDialog.js
@@ -1,8 +1,8 @@
// @flow
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../../base/redux';
import {
getConferenceId,
getDefaultDialInNumber,
@@ -228,7 +228,7 @@ class JoinByPhoneDialog extends PureComponent<Props, State> {
* @param {Object} state - The redux state.
* @returns {Object}
*/
-function mapStateToProps(state): Object {
+function mapStateToProps(state) {
return {
dialInNumber: getDefaultDialInNumber(state),
dialOutNumber: getFullDialOutNumber(state),
diff --git a/react/features/prejoin/components/web/preview/DeviceStatus.tsx b/react/features/prejoin/components/web/preview/DeviceStatus.tsx
index ac89112790..da69ad8d94 100644
--- a/react/features/prejoin/components/web/preview/DeviceStatus.tsx
+++ b/react/features/prejoin/components/web/preview/DeviceStatus.tsx
@@ -1,10 +1,10 @@
import React from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { IReduxState } from '../../../../app/types';
import { translate } from '../../../../base/i18n/functions';
-import { connect } from '../../../../base/redux/functions';
import { withPixelLineHeight } from '../../../../base/styles/functions.web';
import {
getDeviceStatusText,
diff --git a/react/features/presence-status/components/PresenceLabel.js b/react/features/presence-status/components/PresenceLabel.js
index 3ffed94ae4..08951f3f18 100644
--- a/react/features/presence-status/components/PresenceLabel.js
+++ b/react/features/presence-status/components/PresenceLabel.js
@@ -1,11 +1,11 @@
/* @flow */
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
import { getParticipantById } from '../../base/participants';
import { Text } from '../../base/react';
-import { connect } from '../../base/redux';
import { STATUS_TO_I18N_KEY } from '../constants';
import { presenceStatusDisabled } from '../functions';
diff --git a/react/features/reactions/components/native/RaiseHandButton.js b/react/features/reactions/components/native/RaiseHandButton.js
index 023d2edafe..08c857631b 100644
--- a/react/features/reactions/components/native/RaiseHandButton.js
+++ b/react/features/reactions/components/native/RaiseHandButton.js
@@ -2,6 +2,7 @@
import React, { Component } from 'react';
import { Text } from 'react-native-paper';
+import { connect } from 'react-redux';
import { type Dispatch } from 'redux';
import {
@@ -15,7 +16,6 @@ import {
hasRaisedHand,
raiseHand
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { type AbstractButtonProps } from '../../../base/toolbox/components';
import Button from '../../../base/ui/components/native/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants.native';
diff --git a/react/features/reactions/components/native/ReactionMenuDialog.js b/react/features/reactions/components/native/ReactionMenuDialog.js
index c1faf4936d..96f7c46db1 100644
--- a/react/features/reactions/components/native/ReactionMenuDialog.js
+++ b/react/features/reactions/components/native/ReactionMenuDialog.js
@@ -2,11 +2,11 @@
import React, { PureComponent } from 'react';
import { SafeAreaView, TouchableWithoutFeedback, View } from 'react-native';
+import { connect } from 'react-redux';
import { ColorSchemeRegistry } from '../../../base/color-scheme';
import { hideDialog, isDialogOpen } from '../../../base/dialog';
import { getParticipantCount } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import type { StyleType } from '../../../base/styles';
import ReactionMenu from './ReactionMenu';
diff --git a/react/features/reactions/components/native/ReactionsMenuButton.js b/react/features/reactions/components/native/ReactionsMenuButton.js
index ffc21b2f12..206efdfc58 100644
--- a/react/features/reactions/components/native/ReactionsMenuButton.js
+++ b/react/features/reactions/components/native/ReactionsMenuButton.js
@@ -1,5 +1,6 @@
// @flow
+import { connect } from 'react-redux';
import { type Dispatch } from 'redux';
import { isDialogOpen, openDialog } from '../../../base/dialog';
@@ -9,7 +10,6 @@ import { IconRaiseHand } from '../../../base/icons';
import {
getLocalParticipant, hasRaisedHand
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import ReactionMenuDialog from './ReactionMenuDialog';
diff --git a/react/features/reactions/components/web/RaiseHandButton.js b/react/features/reactions/components/web/RaiseHandButton.js
index a7c5467491..db9f9d57ae 100644
--- a/react/features/reactions/components/web/RaiseHandButton.js
+++ b/react/features/reactions/components/web/RaiseHandButton.js
@@ -1,7 +1,8 @@
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconRaiseHand } from '../../../base/icons';
import { getLocalParticipant, hasRaisedHand } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
diff --git a/react/features/reactions/components/web/ReactionsMenuButton.tsx b/react/features/reactions/components/web/ReactionsMenuButton.tsx
index 0428339445..8d0891e00e 100644
--- a/react/features/reactions/components/web/ReactionsMenuButton.tsx
+++ b/react/features/reactions/components/web/ReactionsMenuButton.tsx
@@ -1,12 +1,11 @@
import React, { useCallback } from 'react';
import { WithTranslation } from 'react-i18next';
-import { useSelector } from 'react-redux';
+import { connect, useSelector } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions';
import { IconArrowUp } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
import ToolboxButtonWithIconPopup from '../../../base/toolbox/components/web/ToolboxButtonWithIconPopup';
diff --git a/react/features/recent-list/components/DeleteItemButton.native.js b/react/features/recent-list/components/DeleteItemButton.native.js
index 6318d4fffd..d070213337 100644
--- a/react/features/recent-list/components/DeleteItemButton.native.js
+++ b/react/features/recent-list/components/DeleteItemButton.native.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../base/i18n';
import { IconTrash } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { deleteRecentListEntry } from '../actions';
diff --git a/react/features/recent-list/components/RecentList.native.js b/react/features/recent-list/components/RecentList.native.js
index c43b49e46f..1925aad533 100644
--- a/react/features/recent-list/components/RecentList.native.js
+++ b/react/features/recent-list/components/RecentList.native.js
@@ -1,12 +1,12 @@
import React from 'react';
import { TouchableWithoutFeedback, View } from 'react-native';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { getDefaultURL } from '../../app/functions';
import { openSheet } from '../../base/dialog/actions';
import { translate } from '../../base/i18n';
import { NavigateSectionList, type Section } from '../../base/react';
-import { connect } from '../../base/redux';
import styles from '../../welcome/components/styles';
import { isRecentListEnabled, toDisplayableList } from '../functions';
diff --git a/react/features/recent-list/components/RecentList.web.js b/react/features/recent-list/components/RecentList.web.js
index 940f176aea..a8c05f1c16 100644
--- a/react/features/recent-list/components/RecentList.web.js
+++ b/react/features/recent-list/components/RecentList.web.js
@@ -1,11 +1,11 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../base/i18n';
import { MeetingsList } from '../../base/react';
-import { connect } from '../../base/redux';
import { deleteRecentListEntry } from '../actions';
import { isRecentListEnabled, toDisplayableList } from '../functions';
diff --git a/react/features/recent-list/components/RecentListItemMenu.native.js b/react/features/recent-list/components/RecentListItemMenu.native.js
index fe2ab330a6..1e6e546427 100644
--- a/react/features/recent-list/components/RecentListItemMenu.native.js
+++ b/react/features/recent-list/components/RecentListItemMenu.native.js
@@ -1,10 +1,10 @@
import React, { PureComponent } from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { BottomSheet, hideSheet } from '../../base/dialog';
import { bottomSheetStyles } from '../../base/dialog/components/native/styles';
import { type Item } from '../../base/react/Types';
-import { connect } from '../../base/redux';
import DeleteItemButton from './DeleteItemButton.native';
import ShowDialInInfoButton from './ShowDialInInfoButton.native';
diff --git a/react/features/recent-list/components/ShowDialInInfoButton.native.js b/react/features/recent-list/components/ShowDialInInfoButton.native.js
index c302ec4081..73d04d8053 100644
--- a/react/features/recent-list/components/ShowDialInInfoButton.native.js
+++ b/react/features/recent-list/components/ShowDialInInfoButton.native.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../base/i18n';
import { IconInfoCircle } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
import { screen } from '../../mobile/navigation/routes';
diff --git a/react/features/recording/components/LiveStream/native/GoogleSigninForm.js b/react/features/recording/components/LiveStream/native/GoogleSigninForm.js
index a9aa63ee19..9d4b9dc13e 100644
--- a/react/features/recording/components/LiveStream/native/GoogleSigninForm.js
+++ b/react/features/recording/components/LiveStream/native/GoogleSigninForm.js
@@ -2,10 +2,10 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { _abstractMapStateToProps } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { StyleType } from '../../../../base/styles';
import {
GOOGLE_API_STATES,
diff --git a/react/features/recording/components/LiveStream/native/LiveStreamButton.js b/react/features/recording/components/LiveStream/native/LiveStreamButton.js
index 11713b9174..ff797f836d 100644
--- a/react/features/recording/components/LiveStream/native/LiveStreamButton.js
+++ b/react/features/recording/components/LiveStream/native/LiveStreamButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { openDialog } from '../../../../base/dialog';
import { LIVE_STREAMING_ENABLED, getFeatureFlag } from '../../../../base/flags';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { navigate }
from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../../../../mobile/navigation/routes';
diff --git a/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js b/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js
index 7c647d2a85..329ba55750 100644
--- a/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js
+++ b/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
-import { connect } from '../../../../base/redux';
import { googleApi } from '../../../../google-api';
import HeaderNavigationButton
from '../../../../mobile/navigation/components/HeaderNavigationButton';
diff --git a/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js b/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js
index 9175e88aff..95be6ab046 100644
--- a/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js
+++ b/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import AbstractStopLiveStreamDialog, {
_mapStateToProps
} from '../AbstractStopLiveStreamDialog';
diff --git a/react/features/recording/components/LiveStream/native/StreamKeyForm.js b/react/features/recording/components/LiveStream/native/StreamKeyForm.js
index 5c9cad9652..eb76d4cdb2 100644
--- a/react/features/recording/components/LiveStream/native/StreamKeyForm.js
+++ b/react/features/recording/components/LiveStream/native/StreamKeyForm.js
@@ -1,9 +1,9 @@
import React from 'react';
import { Linking, Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { _abstractMapStateToProps } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { StyleType } from '../../../../base/styles';
import Button from '../../../../base/ui/components/native/Button';
import Input from '../../../../base/ui/components/native/Input';
diff --git a/react/features/recording/components/LiveStream/native/StreamKeyPicker.js b/react/features/recording/components/LiveStream/native/StreamKeyPicker.js
index dd3cf6fdee..efd40b6e30 100644
--- a/react/features/recording/components/LiveStream/native/StreamKeyPicker.js
+++ b/react/features/recording/components/LiveStream/native/StreamKeyPicker.js
@@ -8,10 +8,10 @@ import {
TouchableOpacity,
View
} from 'react-native';
+import { connect } from 'react-redux';
import { _abstractMapStateToProps } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { StyleType } from '../../../../base/styles';
import { YOUTUBE_LIVE_DASHBOARD_URL } from '../constants';
diff --git a/react/features/recording/components/LiveStream/web/LiveStreamButton.js b/react/features/recording/components/LiveStream/web/LiveStreamButton.js
index 2f4bb9fd59..53bce8dd50 100644
--- a/react/features/recording/components/LiveStream/web/LiveStreamButton.js
+++ b/react/features/recording/components/LiveStream/web/LiveStreamButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { getToolbarButtons } from '../../../../base/config';
import { openDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import AbstractLiveStreamButton, {
type Props,
_mapStateToProps as _abstractMapStateToProps
diff --git a/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js b/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js
index fe4fb77b0a..c94109e0a2 100644
--- a/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js
+++ b/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import Spinner from '../../../../base/ui/components/web/Spinner';
import {
diff --git a/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js b/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js
index e7714f5c75..9687e71020 100644
--- a/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js
+++ b/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import AbstractStopLiveStreamDialog, {
_mapStateToProps
diff --git a/react/features/recording/components/LiveStream/web/StreamKeyForm.js b/react/features/recording/components/LiveStream/web/StreamKeyForm.js
index 708cd3febf..b96a886806 100644
--- a/react/features/recording/components/LiveStream/web/StreamKeyForm.js
+++ b/react/features/recording/components/LiveStream/web/StreamKeyForm.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import Input from '../../../../base/ui/components/web/Input';
import AbstractStreamKeyForm, {
type Props, _mapStateToProps
diff --git a/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts b/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
index 78a42cc9ea..a5f5c19117 100644
--- a/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
+++ b/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
@@ -9,6 +9,7 @@ import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
import { setVideoMuted } from '../../../base/media/actions';
import { stopLocalVideoRecording } from '../../actions';
import { getActiveSession } from '../../functions';
+import { ISessionData } from '../../reducer';
import LocalRecordingManager from './LocalRecordingManager';
@@ -21,12 +22,12 @@ export interface IProps extends WithTranslation {
/**
* The {@code JitsiConference} for the current conference.
*/
- _conference: IJitsiConference;
+ _conference?: IJitsiConference;
/**
* The redux representation of the recording session to be stopped.
*/
- _fileRecordingSession: Object;
+ _fileRecordingSession?: ISessionData;
/**
* Whether the recording is a local recording or not.
diff --git a/react/features/recording/components/Recording/native/HighlightButton.js b/react/features/recording/components/Recording/native/HighlightButton.js
index d374b56fb4..704cedd231 100644
--- a/react/features/recording/components/Recording/native/HighlightButton.js
+++ b/react/features/recording/components/Recording/native/HighlightButton.js
@@ -1,12 +1,12 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../../../base/i18n';
import { IconHighlight } from '../../../../base/icons';
import { Label } from '../../../../base/label';
-import { connect } from '../../../../base/redux';
import BaseTheme from '../../../../base/ui/components/BaseTheme';
import AbstractHighlightButton, {
type Props as AbstractProps,
diff --git a/react/features/recording/components/Recording/native/RecordButton.js b/react/features/recording/components/Recording/native/RecordButton.js
index 18c29c6538..269ddd2c43 100644
--- a/react/features/recording/components/Recording/native/RecordButton.js
+++ b/react/features/recording/components/Recording/native/RecordButton.js
@@ -1,11 +1,11 @@
// @flow
import { Platform } from 'react-native';
+import { connect } from 'react-redux';
import { openDialog } from '../../../../base/dialog';
import { IOS_RECORDING_ENABLED, RECORDING_ENABLED, getFeatureFlag } from '../../../../base/flags';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { navigate }
from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../../../../mobile/navigation/routes';
diff --git a/react/features/recording/components/Recording/native/StartRecordingDialog.js b/react/features/recording/components/Recording/native/StartRecordingDialog.js
index 5227c53fd8..c2fa60119f 100644
--- a/react/features/recording/components/Recording/native/StartRecordingDialog.js
+++ b/react/features/recording/components/Recording/native/StartRecordingDialog.js
@@ -1,8 +1,8 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
-import { connect } from '../../../../base/redux';
import HeaderNavigationButton
from '../../../../mobile/navigation/components/HeaderNavigationButton';
import { goBack } from
diff --git a/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx
index 2cf670adab..756857fa0f 100644
--- a/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx
+++ b/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx
@@ -2,11 +2,11 @@
import React from 'react';
import { Image, View } from 'react-native';
import { Text } from 'react-native-paper';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n/functions';
// @ts-ignore
import { LoadingIndicator } from '../../../../base/react';
-import { connect } from '../../../../base/redux/functions';
import Button from '../../../../base/ui/components/native/Button';
import Switch from '../../../../base/ui/components/native/Switch';
import { BUTTON_TYPES } from '../../../../base/ui/constants.native';
diff --git a/react/features/recording/components/Recording/native/StopRecordingDialog.js b/react/features/recording/components/Recording/native/StopRecordingDialog.js
index a62c94292f..72cf3d5f43 100644
--- a/react/features/recording/components/Recording/native/StopRecordingDialog.js
+++ b/react/features/recording/components/Recording/native/StopRecordingDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import AbstractStopRecordingDialog, {
type Props,
_mapStateToProps
diff --git a/react/features/recording/components/Recording/web/HighlightButton.tsx b/react/features/recording/components/Recording/web/HighlightButton.tsx
index 77a4f1db89..7526811faf 100644
--- a/react/features/recording/components/Recording/web/HighlightButton.tsx
+++ b/react/features/recording/components/Recording/web/HighlightButton.tsx
@@ -1,6 +1,7 @@
import { Theme } from '@mui/material';
import { withStyles } from '@mui/styles';
import React from 'react';
+import { connect } from 'react-redux';
// @ts-ignore
import { StartRecordingDialog } from '../..';
@@ -9,7 +10,6 @@ import { translate } from '../../../../base/i18n/functions';
import { IconHighlight } from '../../../../base/icons/svg';
import { MEET_FEATURES } from '../../../../base/jwt/constants';
import Label from '../../../../base/label/components/web/Label';
-import { connect } from '../../../../base/redux/functions';
import Tooltip from '../../../../base/tooltip/components/Tooltip';
import BaseTheme from '../../../../base/ui/components/BaseTheme.web';
import { maybeShowPremiumFeatureDialog } from '../../../../jaas/actions';
@@ -55,7 +55,7 @@ interface IState {
const styles = (theme: Theme) => {
return {
container: {
- position: 'relative'
+ position: 'relative' as const
},
disabled: {
background: theme.palette.text02
@@ -67,13 +67,13 @@ const styles = (theme: Theme) => {
backgroundColor: theme.palette.field02,
borderRadius: '6px',
boxShadow: '0px 6px 20px rgba(0, 0, 0, 0.25)',
- boxSizing: 'border-box',
+ boxSizing: 'border-box' as const,
color: theme.palette.uiBackground,
fontSize: '14px',
fontWeight: '400',
left: '4px',
padding: '16px',
- position: 'absolute',
+ position: 'absolute' as const,
top: '32px',
width: 320
},
diff --git a/react/features/recording/components/Recording/web/RecordButton.js b/react/features/recording/components/Recording/web/RecordButton.js
index 11ccb00806..9c6e938917 100644
--- a/react/features/recording/components/Recording/web/RecordButton.js
+++ b/react/features/recording/components/Recording/web/RecordButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { getToolbarButtons } from '../../../../base/config';
import { openDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import AbstractRecordButton, {
type Props,
_mapStateToProps as _abstractMapStateToProps
@@ -47,7 +48,7 @@ class RecordingButton extends AbstractRecordButton<Props> {
* visible: boolean
* }}
*/
-export function _mapStateToProps(state: Object, ownProps: Props): Object {
+export function _mapStateToProps(state: Object, ownProps: Props) {
const abstractProps = _abstractMapStateToProps(state, ownProps);
const toolbarButtons = getToolbarButtons(state);
const visible = toolbarButtons.includes('recording') && abstractProps.visible;
diff --git a/react/features/recording/components/Recording/web/StartRecordingDialog.js b/react/features/recording/components/Recording/web/StartRecordingDialog.js
index 1560418c1f..3f907c30c4 100644
--- a/react/features/recording/components/Recording/web/StartRecordingDialog.js
+++ b/react/features/recording/components/Recording/web/StartRecordingDialog.js
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture';
import { isScreenshotCaptureEnabled } from '../../../../screenshot-capture/functions';
diff --git a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
index 9d095d19c8..c2db922952 100644
--- a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
+++ b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
@@ -1,5 +1,6 @@
/* eslint-disable lines-around-comment */
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n/functions';
import {
@@ -9,7 +10,6 @@ import {
Text
// @ts-ignore
} from '../../../../base/react';
-import { connect } from '../../../../base/redux/functions';
import Button from '../../../../base/ui/components/web/Button';
import Switch from '../../../../base/ui/components/web/Switch';
import { BUTTON_TYPES } from '../../../../base/ui/constants.web';
diff --git a/react/features/recording/components/Recording/web/StopRecordingDialog.tsx b/react/features/recording/components/Recording/web/StopRecordingDialog.tsx
index 2aec8ee59b..777af3c9ae 100644
--- a/react/features/recording/components/Recording/web/StopRecordingDialog.tsx
+++ b/react/features/recording/components/Recording/web/StopRecordingDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../../base/i18n/functions';
-import { connect } from '../../../../base/redux/functions';
import Dialog from '../../../../base/ui/components/web/Dialog';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
diff --git a/react/features/recording/components/native/RecordingExpandedLabel.js b/react/features/recording/components/native/RecordingExpandedLabel.js
index 88c0013471..bbef65b699 100644
--- a/react/features/recording/components/native/RecordingExpandedLabel.js
+++ b/react/features/recording/components/native/RecordingExpandedLabel.js
@@ -1,12 +1,13 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import {
type Props as AbstractProps,
ExpandedLabel
} from '../../../base/label';
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
-import { connect } from '../../../base/redux';
import { getSessionStatusToShow } from '../../functions';
type Props = AbstractProps & {
diff --git a/react/features/recording/components/native/RecordingLabel.js b/react/features/recording/components/native/RecordingLabel.js
index f9e1773dc7..c1e4c97190 100644
--- a/react/features/recording/components/native/RecordingLabel.js
+++ b/react/features/recording/components/native/RecordingLabel.js
@@ -1,11 +1,11 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { Label } from '../../../base/label';
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
-import { connect } from '../../../base/redux';
import AbstractRecordingLabel, {
_mapStateToProps
} from '../AbstractRecordingLabel';
diff --git a/react/features/recording/components/web/RecordingLabel.tsx b/react/features/recording/components/web/RecordingLabel.tsx
index afcdb1d888..4755694b99 100644
--- a/react/features/recording/components/web/RecordingLabel.tsx
+++ b/react/features/recording/components/web/RecordingLabel.tsx
@@ -1,12 +1,12 @@
import { Theme } from '@mui/material';
import { withStyles } from '@mui/styles';
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
import { IconRecord, IconSites } from '../../../base/icons/svg';
import Label from '../../../base/label/components/web/Label';
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
-import { connect } from '../../../base/redux/functions';
import Tooltip from '../../../base/tooltip/components/Tooltip';
import AbstractRecordingLabel, {
_mapStateToProps
diff --git a/react/features/recording/components/web/RecordingLimitNotificationDescription.js b/react/features/recording/components/web/RecordingLimitNotificationDescription.js
index 1c37da42eb..6df7bb9703 100644
--- a/react/features/recording/components/web/RecordingLimitNotificationDescription.js
+++ b/react/features/recording/components/web/RecordingLimitNotificationDescription.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate, translateToHTML } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
/**
* The type of the React {@code Component} props of {@link RecordingLimitNotificationDescription}.
@@ -62,7 +62,7 @@ function RecordingLimitNotificationDescription(props: Props) {
/**
- * Maps part of the Redix state to the props of this component.
+ * Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
* @returns {Props}
diff --git a/react/features/recording/reducer.ts b/react/features/recording/reducer.ts
index 63725a704f..9e50a00ba4 100644
--- a/react/features/recording/reducer.ts
+++ b/react/features/recording/reducer.ts
@@ -16,7 +16,7 @@ const DEFAULT_STATE = {
sessionDatas: []
};
-interface ISessionData {
+export interface ISessionData {
error?: Error;
id?: string;
initiator?: { getId: Function; };
diff --git a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js b/react/features/remote-control/components/RemoteControlAuthorizationDialog.js
index b33af8b7e4..dfe7d81c89 100644
--- a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js
+++ b/react/features/remote-control/components/RemoteControlAuthorizationDialog.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
import { getParticipantById } from '../../base/participants';
-import { connect } from '../../base/redux';
import { getLocalVideoTrack } from '../../base/tracks';
import Dialog from '../../base/ui/components/web/Dialog';
import { deny, grant } from '../actions';
diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.native.js b/react/features/room-lock/components/PasswordRequiredPrompt.native.js
index e436607c1e..dcb6c3ca1d 100644
--- a/react/features/room-lock/components/PasswordRequiredPrompt.native.js
+++ b/react/features/room-lock/components/PasswordRequiredPrompt.native.js
@@ -1,11 +1,11 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { setPassword } from '../../base/conference';
import { InputDialog } from '../../base/dialog';
-import { connect } from '../../base/redux';
import { _cancelPasswordRequiredPrompt } from '../actions';
/**
diff --git a/react/features/screen-share/components/web/ShareAudioButton.js b/react/features/screen-share/components/web/ShareAudioButton.js
index f990c82d3f..b31db794f1 100644
--- a/react/features/screen-share/components/web/ShareAudioButton.js
+++ b/react/features/screen-share/components/web/ShareAudioButton.js
@@ -1,5 +1,6 @@
// @flow
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../../base/i18n';
@@ -7,7 +8,6 @@ import {
IconVolumeOff,
IconVolumeUp
} from '../../../base/icons';
-import { connect } from '../../../base/redux';
import {
AbstractButton,
type AbstractButtonProps
@@ -72,7 +72,7 @@ class ShareAudioButton extends AbstractButton<Props, *> {
* @private
* @returns {Props}
*/
-function _mapStateToProps(state: Object): $Shape<Props> {
+function _mapStateToProps(state: Object) {
return {
_isAudioOnlySharing: isAudioOnlySharing(state)
diff --git a/react/features/screen-share/components/web/ShareAudioDialog.tsx b/react/features/screen-share/components/web/ShareAudioDialog.tsx
index 6d8f6ed2ad..4a4480e63f 100644
--- a/react/features/screen-share/components/web/ShareAudioDialog.tsx
+++ b/react/features/screen-share/components/web/ShareAudioDialog.tsx
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IReduxState, IStore } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import { updateSettings } from '../../../base/settings/actions';
import { shouldHideShareAudioHelper } from '../../../base/settings/functions.web';
import { toggleScreensharing } from '../../../base/tracks/actions.web';
@@ -105,10 +105,10 @@ class ShareAudioDialog extends Component<IProps> {
* @private
* @returns {IProps}
*/
-function _mapStateToProps(state: IReduxState): Partial<IProps> {
+function _mapStateToProps(state: IReduxState) {
return {
- _shouldHideShareAudioHelper: shouldHideShareAudioHelper(state)
+ _shouldHideShareAudioHelper: Boolean(shouldHideShareAudioHelper(state))
};
}
diff --git a/react/features/screen-share/components/web/ShareScreenWarningDialog.tsx b/react/features/screen-share/components/web/ShareScreenWarningDialog.tsx
index 5a0caa38ed..071072146e 100644
--- a/react/features/screen-share/components/web/ShareScreenWarningDialog.tsx
+++ b/react/features/screen-share/components/web/ShareScreenWarningDialog.tsx
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { IStore } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import { toggleScreensharing } from '../../../base/tracks/actions';
import Dialog from '../../../base/ui/components/web/Dialog';
diff --git a/react/features/security/components/security-dialog/native/SecurityDialog.js b/react/features/security/components/security-dialog/native/SecurityDialog.js
index 93afc19909..99260ecb13 100644
--- a/react/features/security/components/security-dialog/native/SecurityDialog.js
+++ b/react/features/security/components/security-dialog/native/SecurityDialog.js
@@ -3,6 +3,7 @@ import {
Text,
View
} from 'react-native';
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { getSecurityUiConfig } from '../../../../base/config/functions.any';
@@ -10,7 +11,6 @@ import { MEETING_PASSWORD_ENABLED, getFeatureFlag } from '../../../../base/flags
import { translate } from '../../../../base/i18n';
import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
import { isLocalParticipantModerator } from '../../../../base/participants';
-import { connect } from '../../../../base/redux';
import Button from '../../../../base/ui/components/native/Button';
import Input from '../../../../base/ui/components/native/Input';
import Switch from '../../../../base/ui/components/native/Switch';
diff --git a/react/features/security/components/security-dialog/native/SecurityDialogButton.js b/react/features/security/components/security-dialog/native/SecurityDialogButton.js
index ba29c91368..6672f006a8 100644
--- a/react/features/security/components/security-dialog/native/SecurityDialogButton.js
+++ b/react/features/security/components/security-dialog/native/SecurityDialogButton.js
@@ -1,7 +1,8 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { navigate } from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../../../../mobile/navigation/routes';
import AbstractSecurityDialogButton, {
diff --git a/react/features/security/components/security-dialog/web/PasswordForm.tsx b/react/features/security/components/security-dialog/web/PasswordForm.tsx
index 28603aa0cf..8ee97ae0c1 100644
--- a/react/features/security/components/security-dialog/web/PasswordForm.tsx
+++ b/react/features/security/components/security-dialog/web/PasswordForm.tsx
@@ -19,7 +19,7 @@ interface IProps extends WithTranslation {
* The value for how the conference is locked (or undefined if not locked)
* as defined by room-lock constants.
*/
- locked: string;
+ locked?: string;
/**
* Callback to invoke when the local participant is submitting a password
@@ -30,7 +30,7 @@ interface IProps extends WithTranslation {
/**
* The current known password for the JitsiConference.
*/
- password: string;
+ password?: string;
/**
* The number of digits to be used in the password.
diff --git a/react/features/security/components/security-dialog/web/PasswordSection.tsx b/react/features/security/components/security-dialog/web/PasswordSection.tsx
index 70f4618b0c..d5921e3cd6 100644
--- a/react/features/security/components/security-dialog/web/PasswordSection.tsx
+++ b/react/features/security/components/security-dialog/web/PasswordSection.tsx
@@ -35,12 +35,12 @@ interface IProps extends WithTranslation {
* The value for how the conference is locked (or undefined if not locked)
* as defined by room-lock constants.
*/
- locked: string;
+ locked?: string;
/**
* The current known password for the JitsiConference.
*/
- password: string;
+ password?: string;
/**
* Whether or not to show the password in editing mode.
@@ -165,7 +165,7 @@ function PasswordSection({
* @returns {void}
*/
function onPasswordCopy() {
- copyText(password);
+ copyText(password ?? '');
}
/**
diff --git a/react/features/security/components/security-dialog/web/SecurityDialog.tsx b/react/features/security/components/security-dialog/web/SecurityDialog.tsx
index 0e414ae1c0..0df21c905f 100644
--- a/react/features/security/components/security-dialog/web/SecurityDialog.tsx
+++ b/react/features/security/components/security-dialog/web/SecurityDialog.tsx
@@ -1,11 +1,12 @@
/* eslint-disable lines-around-comment */
import React, { useEffect, useState } from 'react';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../../app/types';
import { setPassword as setPass } from '../../../../base/conference/actions';
+import { IJitsiConference } from '../../../../base/conference/reducer';
import { getSecurityUiConfig } from '../../../../base/config/functions.any';
import { isLocalParticipantModerator } from '../../../../base/participants/functions';
-import { connect } from '../../../../base/redux/functions';
import Dialog from '../../../../base/ui/components/web/Dialog';
// @ts-ignore
import { E2EESection } from '../../../../e2ee/components';
@@ -36,7 +37,7 @@ interface IProps {
* The JitsiConference for which to display a lock state and change the
* password.
*/
- _conference: Object;
+ _conference?: IJitsiConference;
/**
* Whether to hide the lobby password section.
@@ -47,12 +48,12 @@ interface IProps {
* The value for how the conference is locked (or undefined if not locked)
* as defined by room-lock constants.
*/
- _locked: string;
+ _locked?: string;
/**
* The current known password for the JitsiConference.
*/
- _password: string;
+ _password?: string;
/**
* The number of digits to be used in the password.
@@ -152,7 +153,7 @@ function mapStateToProps(state: IReduxState) {
const showE2ee = Boolean(e2eeSupported) && isLocalParticipantModerator(state);
return {
- _buttonsWithNotifyClick: buttonsWithNotifyClick,
+ _buttonsWithNotifyClick: buttonsWithNotifyClick ?? [],
_canEditPassword: isLocalParticipantModerator(state),
_conference: conference,
_dialIn: state['features/invite'],
diff --git a/react/features/security/components/security-dialog/web/SecurityDialogButton.js b/react/features/security/components/security-dialog/web/SecurityDialogButton.js
index 17e7a40d22..be3206a816 100644
--- a/react/features/security/components/security-dialog/web/SecurityDialogButton.js
+++ b/react/features/security/components/security-dialog/web/SecurityDialogButton.js
@@ -1,7 +1,8 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../../base/i18n';
-import { connect } from '../../../../base/redux';
import { toggleSecurityDialog } from '../../../actions';
import AbstractSecurityDialogButton, {
type Props as AbstractSecurityDialogButtonProps,
diff --git a/react/features/settings/components/native/SettingsView.tsx b/react/features/settings/components/native/SettingsView.tsx
index ef07b60e50..d74fa4e033 100644
--- a/react/features/settings/components/native/SettingsView.tsx
+++ b/react/features/settings/components/native/SettingsView.tsx
@@ -13,6 +13,7 @@ import {
View
} from 'react-native';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { getDefaultURL } from '../../../app/functions.native';
@@ -24,7 +25,6 @@ import { translate } from '../../../base/i18n/functions';
// @ts-ignore
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
import { getLocalParticipant } from '../../../base/participants/functions';
-import { connect } from '../../../base/redux/functions';
import { updateSettings } from '../../../base/settings/actions';
import Button from '../../../base/ui/components/native/Button';
import Input from '../../../base/ui/components/native/Input';
@@ -52,52 +52,52 @@ interface IState {
/**
* State variable for the disable call integration switch.
*/
- disableCallIntegration: boolean;
+ disableCallIntegration?: boolean;
/**
* State variable for the disable crash reporting switch.
*/
- disableCrashReporting: boolean;
+ disableCrashReporting?: boolean;
/**
* State variable for the disable p2p switch.
*/
- disableP2P: boolean;
+ disableP2P?: boolean;
/**
* Whether the self view is disabled or not.
*/
- disableSelfView: boolean;
+ disableSelfView?: boolean;
/**
* State variable for the display name field.
*/
- displayName: string;
+ displayName?: string;
/**
* State variable for the email field.
*/
- email: string;
+ email?: string;
/**
* State variable for the server URL field.
*/
- serverURL: string;
+ serverURL?: string;
/**
* State variable for start car mode.
*/
- startCarMode: boolean;
+ startCarMode?: boolean;
/**
* State variable for the start with audio muted switch.
*/
- startWithAudioMuted: boolean;
+ startWithAudioMuted?: boolean;
/**
* State variable for the start with video muted switch.
*/
- startWithVideoMuted: boolean;
+ startWithVideoMuted?: boolean;
}
/**
@@ -118,7 +118,7 @@ interface IProps extends WithTranslation {
/**
* The ID of the local participant.
*/
- _localParticipantId: string;
+ _localParticipantId?: string;
/**
* The default URL for when there is no custom URL set in the settings.
@@ -138,16 +138,16 @@ interface IProps extends WithTranslation {
* The current settings object.
*/
_settings: {
- disableCallIntegration: boolean;
- disableCrashReporting: boolean;
- disableP2P: boolean;
- disableSelfView: boolean;
- displayName: string;
- email: string;
- serverURL: string;
- startCarMode: boolean;
- startWithAudioMuted: boolean;
- startWithVideoMuted: boolean;
+ disableCallIntegration?: boolean;
+ disableCrashReporting?: boolean;
+ disableP2P?: boolean;
+ disableSelfView?: boolean;
+ displayName?: string;
+ email?: string;
+ serverURL?: string;
+ startCarMode?: boolean;
+ startWithAudioMuted?: boolean;
+ startWithVideoMuted?: boolean;
};
/**
@@ -155,7 +155,7 @@ interface IProps extends WithTranslation {
*
* @protected
*/
- _visible: boolean;
+ _visible?: boolean;
/**
* Add bottom padding to the screen.
@@ -305,7 +305,7 @@ class SettingsView extends Component<IProps, IState> {
onChange = { this._onChangeDisplayName }
placeholder = { t('settingsView.displayNamePlaceholderText') }
textContentType = { 'name' } // iOS only
- value = { displayName } />
+ value = { displayName ?? '' } />
{/* @ts-ignore */}
<Divider style = { styles.fieldSeparator } />
<Input
@@ -317,7 +317,7 @@ class SettingsView extends Component<IProps, IState> {
onChange = { this._onChangeEmail }
placeholder = { t('settingsView.emailPlaceholderText') }
textContentType = { 'emailAddress' } // iOS only
- value = { email } />
+ value = { email ?? '' } />
</FormSection>
{/* @ts-ignore */}
<FormSection
@@ -333,12 +333,12 @@ class SettingsView extends Component<IProps, IState> {
onChange = { this._onChangeServerURL }
placeholder = { this.props._serverURL }
textContentType = { 'URL' } // iOS only
- value = { serverURL } />
+ value = { serverURL ?? '' } />
{/* @ts-ignore */}
<Divider style = { styles.fieldSeparator } />
<FormRow label = 'settingsView.startCarModeInLowBandwidthMode'>
<Switch
- checked = { startCarMode }
+ checked = { Boolean(startCarMode) }
// @ts-ignore
onChange = { this._onStartCarmodeInLowBandwidthMode } />
</FormRow>
@@ -347,7 +347,7 @@ class SettingsView extends Component<IProps, IState> {
<FormRow
label = 'settingsView.startWithAudioMuted'>
<Switch
- checked = { startWithAudioMuted }
+ checked = { Boolean(startWithAudioMuted) }
// @ts-ignore
onChange = { this._onStartAudioMutedChange } />
</FormRow>
@@ -355,7 +355,7 @@ class SettingsView extends Component<IProps, IState> {
<Divider style = { styles.fieldSeparator } />
<FormRow label = 'settingsView.startWithVideoMuted'>
<Switch
- checked = { startWithVideoMuted }
+ checked = { Boolean(startWithVideoMuted) }
// @ts-ignore
onChange = { this._onStartVideoMutedChange } />
</FormRow>
@@ -363,7 +363,7 @@ class SettingsView extends Component<IProps, IState> {
<Divider style = { styles.fieldSeparator } />
<FormRow label = 'videothumbnail.hideSelfView'>
<Switch
- checked = { disableSelfView }
+ checked = { Boolean(disableSelfView) }
// @ts-ignore
onChange = { this._onDisableSelfView } />
</FormRow>
@@ -413,7 +413,7 @@ class SettingsView extends Component<IProps, IState> {
<FormRow
label = 'settingsView.disableCallIntegration'>
<Switch
- checked = { disableCallIntegration }
+ checked = { Boolean(disableCallIntegration) }
// @ts-ignore
onChange = { this._onDisableCallIntegration } />
</FormRow>
@@ -424,7 +424,7 @@ class SettingsView extends Component<IProps, IState> {
<FormRow
label = 'settingsView.disableP2P'>
<Switch
- checked = { disableP2P }
+ checked = { Boolean(disableP2P) }
// @ts-ignore
onChange = { this._onDisableP2P } />
</FormRow>
@@ -435,7 +435,7 @@ class SettingsView extends Component<IProps, IState> {
fieldSeparator = { true }
label = 'settingsView.disableCrashReporting'>
<Switch
- checked = { disableCrashReporting }
+ checked = { Boolean(disableCrashReporting) }
// @ts-ignore
onChange = { this._onDisableCrashReporting } />
</FormRow>
@@ -652,7 +652,7 @@ class SettingsView extends Component<IProps, IState> {
_processServerURL(hideOnSuccess: boolean) {
// @ts-ignore
const { serverURL } = this.props._settings;
- const normalizedURL = normalizeUserInputURL(serverURL);
+ const normalizedURL = normalizeUserInputURL(serverURL ?? '');
if (normalizedURL === null) {
this._showURLAlert();
diff --git a/react/features/settings/components/web/LogoutDialog.tsx b/react/features/settings/components/web/LogoutDialog.tsx
index 5bc5978aa8..05577a6f99 100644
--- a/react/features/settings/components/web/LogoutDialog.tsx
+++ b/react/features/settings/components/web/LogoutDialog.tsx
@@ -1,8 +1,8 @@
import React from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
/**
diff --git a/react/features/settings/components/web/SettingsButton.js b/react/features/settings/components/web/SettingsButton.js
index e43b28ebfb..c7dd6e8b20 100644
--- a/react/features/settings/components/web/SettingsButton.js
+++ b/react/features/settings/components/web/SettingsButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { translate } from '../../../base/i18n';
import { IconGear } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { openSettingsDialog } from '../../actions';
import { SETTINGS_TABS } from '../../constants';
diff --git a/react/features/settings/components/web/SettingsDialog.tsx b/react/features/settings/components/web/SettingsDialog.tsx
index ec53dc0eb2..92a296e1fa 100644
--- a/react/features/settings/components/web/SettingsDialog.tsx
+++ b/react/features/settings/components/web/SettingsDialog.tsx
@@ -1,5 +1,6 @@
import { withStyles } from '@mui/styles';
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import {
@@ -13,7 +14,6 @@ import {
IconVideo,
IconVolumeUp
} from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
import DialogWithTabs, { IDialogTab } from '../../../base/ui/components/web/DialogWithTabs';
import { isCalendarEnabled } from '../../../calendar-sync/functions.web';
import { submitAudioDeviceSelectionTab, submitVideoDeviceSelectionTab } from '../../../device-selection/actions.web';
diff --git a/react/features/shared-video/components/native/SharedVideo.js b/react/features/shared-video/components/native/SharedVideo.js
index 2cc1df5fc5..8c69ebd9c6 100644
--- a/react/features/shared-video/components/native/SharedVideo.js
+++ b/react/features/shared-video/components/native/SharedVideo.js
@@ -2,9 +2,9 @@
import React, { Component } from 'react';
import { View } from 'react-native';
+import { connect } from 'react-redux';
import { getLocalParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { ASPECT_RATIO_WIDE } from '../../../base/responsive-ui';
import { setToolboxVisible } from '../../../toolbox/actions';
diff --git a/react/features/shared-video/components/native/SharedVideoButton.js b/react/features/shared-video/components/native/SharedVideoButton.js
index 1e04ffc86e..d4ba52dbf2 100644
--- a/react/features/shared-video/components/native/SharedVideoButton.js
+++ b/react/features/shared-video/components/native/SharedVideoButton.js
@@ -1,12 +1,12 @@
// @flow
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { VIDEO_SHARE_BUTTON_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconPlay } from '../../../base/icons';
import { getLocalParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { toggleSharedVideo } from '../../actions.native';
import { isSharingStatus } from '../../functions';
diff --git a/react/features/shared-video/components/native/SharedVideoDialog.js b/react/features/shared-video/components/native/SharedVideoDialog.js
index dbf4e2cb95..3ad4ed32a1 100644
--- a/react/features/shared-video/components/native/SharedVideoDialog.js
+++ b/react/features/shared-video/components/native/SharedVideoDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { InputDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
/**
diff --git a/react/features/shared-video/components/native/VideoManager.js b/react/features/shared-video/components/native/VideoManager.js
index 1f18c1e6ef..9dd67daf70 100644
--- a/react/features/shared-video/components/native/VideoManager.js
+++ b/react/features/shared-video/components/native/VideoManager.js
@@ -1,8 +1,8 @@
import Logger from '@jitsi/logger';
import React from 'react';
import Video from 'react-native-video';
+import { connect } from 'react-redux';
-import { connect } from '../../../base/redux';
import { PLAYBACK_STATUSES } from '../../constants';
import AbstractVideoManager, {
diff --git a/react/features/shared-video/components/native/YoutubeVideoManager.js b/react/features/shared-video/components/native/YoutubeVideoManager.js
index 10cf17aa29..30fdc1895d 100644
--- a/react/features/shared-video/components/native/YoutubeVideoManager.js
+++ b/react/features/shared-video/components/native/YoutubeVideoManager.js
@@ -1,7 +1,7 @@
import React from 'react';
import Video from 'react-native-youtube-iframe';
+import { connect } from 'react-redux';
-import { connect } from '../../../base/redux';
import { PLAYBACK_STATUSES } from '../../constants';
import AbstractVideoManager, {
diff --git a/react/features/shared-video/components/web/AbstractVideoManager.js b/react/features/shared-video/components/web/AbstractVideoManager.js
index 74f6528ee6..69e29e2fc9 100644
--- a/react/features/shared-video/components/web/AbstractVideoManager.js
+++ b/react/features/shared-video/components/web/AbstractVideoManager.js
@@ -399,7 +399,7 @@ export default AbstractVideoManager;
* @param {Object} state - The Redux state.
* @returns {Props}
*/
-export function _mapStateToProps(state: Object): $Shape<Props> {
+export function _mapStateToProps(state: Object) {
const { ownerId, status, time, videoUrl, muted } = state['features/shared-video'];
const localParticipant = getLocalParticipant(state);
const _isLocalAudioMuted = isLocalTrackMuted(state['features/base/tracks'], MEDIA_TYPE.AUDIO);
diff --git a/react/features/shared-video/components/web/SharedVideo.js b/react/features/shared-video/components/web/SharedVideo.js
index 3bac8ac2ab..591d8b1b4f 100644
--- a/react/features/shared-video/components/web/SharedVideo.js
+++ b/react/features/shared-video/components/web/SharedVideo.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import Filmstrip from '../../../../../modules/UI/videolayout/Filmstrip';
import { getLocalParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { getVerticalViewMaxWidth } from '../../../filmstrip/functions.web';
import { getToolboxHeight } from '../../../toolbox/functions.web';
diff --git a/react/features/shared-video/components/web/SharedVideoButton.js b/react/features/shared-video/components/web/SharedVideoButton.js
index c59d3c2aab..38b3fb1d6f 100644
--- a/react/features/shared-video/components/web/SharedVideoButton.js
+++ b/react/features/shared-video/components/web/SharedVideoButton.js
@@ -1,10 +1,10 @@
// @flow
+import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { translate } from '../../../base/i18n';
import { IconPlay } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import {
AbstractButton,
type AbstractButtonProps
@@ -92,7 +92,7 @@ class SharedVideoButton extends AbstractButton<Props, *> {
* @private
* @returns {Props}
*/
-function _mapStateToProps(state): Object {
+function _mapStateToProps(state) {
const {
disabled: sharedVideoBtnDisabled,
status: sharedVideoStatus
diff --git a/react/features/shared-video/components/web/SharedVideoDialog.tsx b/react/features/shared-video/components/web/SharedVideoDialog.tsx
index bcef2e4e29..277f6fc495 100644
--- a/react/features/shared-video/components/web/SharedVideoDialog.tsx
+++ b/react/features/shared-video/components/web/SharedVideoDialog.tsx
@@ -1,8 +1,8 @@
import React from 'react';
+import { connect } from 'react-redux';
import { hideDialog } from '../../../base/dialog/actions';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Input from '../../../base/ui/components/web/Input';
import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
diff --git a/react/features/shared-video/components/web/VideoManager.js b/react/features/shared-video/components/web/VideoManager.js
index 468312e59c..a15c1e7d67 100644
--- a/react/features/shared-video/components/web/VideoManager.js
+++ b/react/features/shared-video/components/web/VideoManager.js
@@ -1,6 +1,6 @@
import React from 'react';
+import { connect } from 'react-redux';
-import { connect } from '../../../base/redux';
import { PLAYBACK_STATUSES } from '../../constants';
import AbstractVideoManager, {
diff --git a/react/features/shared-video/components/web/YoutubeVideoManager.js b/react/features/shared-video/components/web/YoutubeVideoManager.js
index 7ec79f3852..033b71351d 100644
--- a/react/features/shared-video/components/web/YoutubeVideoManager.js
+++ b/react/features/shared-video/components/web/YoutubeVideoManager.js
@@ -1,8 +1,8 @@
/* eslint-disable no-invalid-this */
import React from 'react';
+import { connect } from 'react-redux';
import YouTube from 'react-youtube';
-import { connect } from '../../../base/redux';
import { PLAYBACK_STATUSES } from '../../constants';
import AbstractVideoManager, {
diff --git a/react/features/speaker-stats/components/native/SpeakerStatsButton.js b/react/features/speaker-stats/components/native/SpeakerStatsButton.js
index cd2cffcdb2..824d7fbd91 100644
--- a/react/features/speaker-stats/components/native/SpeakerStatsButton.js
+++ b/react/features/speaker-stats/components/native/SpeakerStatsButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { SPEAKERSTATS_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
import { screen } from '../../../mobile/navigation/routes';
import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
diff --git a/react/features/speaker-stats/components/web/SpeakerStatsButton.tsx b/react/features/speaker-stats/components/web/SpeakerStatsButton.tsx
index df266727d4..ebf5f8d1cc 100644
--- a/react/features/speaker-stats/components/web/SpeakerStatsButton.tsx
+++ b/react/features/speaker-stats/components/web/SpeakerStatsButton.tsx
@@ -1,8 +1,9 @@
+import { connect } from 'react-redux';
+
import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../../analytics/functions';
import { openDialog } from '../../../base/dialog/actions';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
import SpeakerStats from './SpeakerStats';
diff --git a/react/features/subtitles/components/Captions.native.js b/react/features/subtitles/components/Captions.native.js
index f1fee6d431..1bcd5db7d8 100644
--- a/react/features/subtitles/components/Captions.native.js
+++ b/react/features/subtitles/components/Captions.native.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { Container, Text } from '../../base/react';
-import { connect } from '../../base/redux';
import {
AbstractCaptions,
diff --git a/react/features/subtitles/components/Captions.web.js b/react/features/subtitles/components/Captions.web.js
index 29149c89d6..b65a7500b0 100644
--- a/react/features/subtitles/components/Captions.web.js
+++ b/react/features/subtitles/components/Captions.web.js
@@ -1,9 +1,9 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { getLocalParticipant } from '../../base/participants';
-import { connect } from '../../base/redux';
import { getLargeVideoParticipant } from '../../large-video/functions';
import { isLayoutTileView } from '../../video-layout';
diff --git a/react/features/subtitles/components/ClosedCaptionButton.native.js b/react/features/subtitles/components/ClosedCaptionButton.native.js
index e62d88f584..b547d70ae6 100644
--- a/react/features/subtitles/components/ClosedCaptionButton.native.js
+++ b/react/features/subtitles/components/ClosedCaptionButton.native.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { CLOSE_CAPTIONS_ENABLED, getFeatureFlag } from '../../base/flags';
import { translate } from '../../base/i18n';
import { IconSubtitles } from '../../base/icons';
-import { connect } from '../../base/redux';
import {
AbstractClosedCaptionButton,
diff --git a/react/features/subtitles/components/ClosedCaptionButton.web.js b/react/features/subtitles/components/ClosedCaptionButton.web.js
index 42c26c86da..e22f70e000 100644
--- a/react/features/subtitles/components/ClosedCaptionButton.web.js
+++ b/react/features/subtitles/components/ClosedCaptionButton.web.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../base/i18n';
import { IconSubtitles } from '../../base/icons';
-import { connect } from '../../base/redux';
import { toggleLanguageSelectorDialog } from '../actions';
import {
diff --git a/react/features/subtitles/components/LanguageSelectorDialog.web.tsx b/react/features/subtitles/components/LanguageSelectorDialog.web.tsx
index b34dc0ec86..3b8470ffe0 100644
--- a/react/features/subtitles/components/LanguageSelectorDialog.web.tsx
+++ b/react/features/subtitles/components/LanguageSelectorDialog.web.tsx
@@ -1,7 +1,7 @@
import i18next from 'i18next';
import React, { useCallback, useEffect, useState } from 'react';
import { WithTranslation } from 'react-i18next';
-import { useDispatch } from 'react-redux';
+import { connect, useDispatch } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { IReduxState } from '../../app/types';
@@ -9,7 +9,6 @@ import { IReduxState } from '../../app/types';
// @ts-ignore
import { TRANSLATION_LANGUAGES, TRANSLATION_LANGUAGES_HEAD } from '../../base/i18n';
import { translate, translateToHTML } from '../../base/i18n/functions';
-import { connect } from '../../base/redux/functions';
import Dialog from '../../base/ui/components/web/Dialog';
import { openSettingsDialog } from '../../settings/actions';
import { SETTINGS_TABS } from '../../settings/constants';
diff --git a/react/features/toolbox/components/AudioMuteButton.js b/react/features/toolbox/components/AudioMuteButton.js
index ca39e8a944..1cc96ea0be 100644
--- a/react/features/toolbox/components/AudioMuteButton.js
+++ b/react/features/toolbox/components/AudioMuteButton.js
@@ -1,5 +1,7 @@
// @flow
+import { connect } from 'react-redux';
+
import {
ACTION_SHORTCUT_TRIGGERED,
AUDIO_MUTE,
@@ -9,7 +11,6 @@ import {
import { AUDIO_MUTE_BUTTON_ENABLED, getFeatureFlag } from '../../base/flags';
import { translate } from '../../base/i18n';
import { MEDIA_TYPE } from '../../base/media';
-import { connect } from '../../base/redux';
import { AbstractAudioMuteButton, AbstractButton } from '../../base/toolbox/components';
import type { AbstractButtonProps } from '../../base/toolbox/components';
import { isLocalTrackMuted } from '../../base/tracks';
@@ -157,7 +158,7 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
* _disabled: boolean
* }}
*/
-function _mapStateToProps(state): Object {
+function _mapStateToProps(state) {
const _audioMuted = isLocalTrackMuted(state['features/base/tracks'], MEDIA_TYPE.AUDIO);
const _disabled = isAudioMuteButtonDisabled(state);
const enabledFlag = getFeatureFlag(state, AUDIO_MUTE_BUTTON_ENABLED, true);
diff --git a/react/features/toolbox/components/DownloadButton.js b/react/features/toolbox/components/DownloadButton.js
index 8d34fa22f8..bdd49728eb 100644
--- a/react/features/toolbox/components/DownloadButton.js
+++ b/react/features/toolbox/components/DownloadButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import { IconDownload } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { openURLInBrowser } from '../../base/util';
diff --git a/react/features/toolbox/components/HangupButton.js b/react/features/toolbox/components/HangupButton.js
index 3d8c3a1a78..a5a94db0d9 100644
--- a/react/features/toolbox/components/HangupButton.js
+++ b/react/features/toolbox/components/HangupButton.js
@@ -1,11 +1,11 @@
// @flow
import _ from 'lodash';
+import { connect } from 'react-redux';
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { leaveConference } from '../../base/conference/actions';
import { translate } from '../../base/i18n';
-import { connect } from '../../base/redux';
import { AbstractHangupButton } from '../../base/toolbox/components';
import type { AbstractButtonProps } from '../../base/toolbox/components';
diff --git a/react/features/toolbox/components/HelpButton.js b/react/features/toolbox/components/HelpButton.js
index 390b4e3519..232b1ec2bc 100644
--- a/react/features/toolbox/components/HelpButton.js
+++ b/react/features/toolbox/components/HelpButton.js
@@ -1,10 +1,11 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { HELP_BUTTON_ENABLED, getFeatureFlag } from '../../base/flags';
import { translate } from '../../base/i18n';
import { IconHelp } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { openURLInBrowser } from '../../base/util';
diff --git a/react/features/toolbox/components/VideoMuteButton.js b/react/features/toolbox/components/VideoMuteButton.js
index 7b5dfb6628..3a00e64a70 100644
--- a/react/features/toolbox/components/VideoMuteButton.js
+++ b/react/features/toolbox/components/VideoMuteButton.js
@@ -1,5 +1,7 @@
// @flow
+import { connect } from 'react-redux';
+
import {
ACTION_SHORTCUT_TRIGGERED,
VIDEO_MUTE,
@@ -9,7 +11,6 @@ import {
import { VIDEO_MUTE_BUTTON_ENABLED, getFeatureFlag } from '../../base/flags';
import { translate } from '../../base/i18n';
import { MEDIA_TYPE } from '../../base/media';
-import { connect } from '../../base/redux';
import { AbstractButton, AbstractVideoMuteButton } from '../../base/toolbox/components';
import type { AbstractButtonProps } from '../../base/toolbox/components';
import { isLocalTrackMuted } from '../../base/tracks';
@@ -160,7 +161,7 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
* _videoMuted: boolean
* }}
*/
-function _mapStateToProps(state): Object {
+function _mapStateToProps(state) {
const tracks = state['features/base/tracks'];
const enabledFlag = getFeatureFlag(state, VIDEO_MUTE_BUTTON_ENABLED, true);
diff --git a/react/features/toolbox/components/native/AudioOnlyButton.js b/react/features/toolbox/components/native/AudioOnlyButton.js
index 1681e0c351..5ae4cb7daa 100644
--- a/react/features/toolbox/components/native/AudioOnlyButton.js
+++ b/react/features/toolbox/components/native/AudioOnlyButton.js
@@ -1,10 +1,11 @@
// @flow
+import { connect } from 'react-redux';
+
import { setAudioOnly, toggleAudioOnly } from '../../../base/audio-only';
import { AUDIO_ONLY_BUTTON_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconAudioOnly, IconAudioOnlyOff } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import {
navigate
diff --git a/react/features/toolbox/components/native/LinkToSalesforceButton.js b/react/features/toolbox/components/native/LinkToSalesforceButton.js
index f61103935d..8c20617d91 100644
--- a/react/features/toolbox/components/native/LinkToSalesforceButton.js
+++ b/react/features/toolbox/components/native/LinkToSalesforceButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { translate } from '../../../base/i18n';
import { IconCloudUpload } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { navigate }
from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
diff --git a/react/features/toolbox/components/native/OpenCarmodeButton.tsx b/react/features/toolbox/components/native/OpenCarmodeButton.tsx
index a935cb2a81..e886b24faa 100644
--- a/react/features/toolbox/components/native/OpenCarmodeButton.tsx
+++ b/react/features/toolbox/components/native/OpenCarmodeButton.tsx
@@ -1,10 +1,11 @@
/* eslint-disable lines-around-comment */
+import { connect } from 'react-redux';
+
import { IReduxState } from '../../../app/types';
import { CAR_MODE_ENABLED } from '../../../base/flags/constants';
import { getFeatureFlag } from '../../../base/flags/functions';
import { translate } from '../../../base/i18n/functions';
import { IconCar } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
// @ts-ignore
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { navigate }
@@ -12,6 +13,7 @@ import { navigate }
from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
// @ts-ignore
import { screen } from '../../../mobile/navigation/routes';
+/* eslint-enable lines-around-comment */
/**
* Implements an {@link AbstractButton} to open the carmode.
@@ -48,5 +50,6 @@ function _mapStateToProps(state: IReduxState, ownProps: AbstractButtonProps): Ob
visible
};
}
+
// @ts-ignore
export default translate(connect(_mapStateToProps)(OpenCarmodeButton));
diff --git a/react/features/toolbox/components/native/OverflowMenu.js b/react/features/toolbox/components/native/OverflowMenu.js
index d0bf093efc..7fb27be2e9 100644
--- a/react/features/toolbox/components/native/OverflowMenu.js
+++ b/react/features/toolbox/components/native/OverflowMenu.js
@@ -2,10 +2,10 @@
import React, { PureComponent } from 'react';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { BottomSheet, hideSheet } from '../../../base/dialog';
import { bottomSheetStyles } from '../../../base/dialog/components/native/styles';
-import { connect } from '../../../base/redux';
import SettingsButton from '../../../base/settings/components/native/SettingsButton';
import { SharedDocumentButton } from '../../../etherpad';
import { ReactionMenu } from '../../../reactions/components';
diff --git a/react/features/toolbox/components/native/OverflowMenuButton.js b/react/features/toolbox/components/native/OverflowMenuButton.js
index 4de324e770..7d2b604f74 100644
--- a/react/features/toolbox/components/native/OverflowMenuButton.js
+++ b/react/features/toolbox/components/native/OverflowMenuButton.js
@@ -1,8 +1,9 @@
+import { connect } from 'react-redux';
+
import { openSheet } from '../../../base/dialog';
import { OVERFLOW_MENU_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconDotsHorizontal } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import OverflowMenu from './OverflowMenu';
diff --git a/react/features/toolbox/components/native/RaiseHandButton.js b/react/features/toolbox/components/native/RaiseHandButton.js
index 532fd582cc..2ff6128b60 100644
--- a/react/features/toolbox/components/native/RaiseHandButton.js
+++ b/react/features/toolbox/components/native/RaiseHandButton.js
@@ -1,5 +1,6 @@
// @flow
+import { connect } from 'react-redux';
import { type Dispatch } from 'redux';
import {
@@ -14,7 +15,6 @@ import {
hasRaisedHand,
raiseHand
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
/**
diff --git a/react/features/toolbox/components/native/ScreenSharingAndroidButton.js b/react/features/toolbox/components/native/ScreenSharingAndroidButton.js
index d289e5250f..b6eab13b20 100644
--- a/react/features/toolbox/components/native/ScreenSharingAndroidButton.js
+++ b/react/features/toolbox/components/native/ScreenSharingAndroidButton.js
@@ -1,12 +1,13 @@
// @flow
+import { connect } from 'react-redux';
+
import {
ANDROID_SCREENSHARING_ENABLED,
getFeatureFlag
} from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconScreenshare } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalVideoTrackDesktop, toggleScreensharing } from '../../../base/tracks';
diff --git a/react/features/toolbox/components/native/ScreenSharingButton.tsx b/react/features/toolbox/components/native/ScreenSharingButton.tsx
index d257a69359..b28e0cddd2 100644
--- a/react/features/toolbox/components/native/ScreenSharingButton.tsx
+++ b/react/features/toolbox/components/native/ScreenSharingButton.tsx
@@ -1,9 +1,9 @@
/* eslint-disable lines-around-comment */
import React from 'react';
import { Platform } from 'react-native';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
-import { connect } from '../../../base/redux/functions';
// @ts-ignore
import { isDesktopShareButtonDisabled } from '../../functions.native';
diff --git a/react/features/toolbox/components/native/ScreenSharingIosButton.js b/react/features/toolbox/components/native/ScreenSharingIosButton.js
index 2e59dfdd62..6955da485e 100644
--- a/react/features/toolbox/components/native/ScreenSharingIosButton.js
+++ b/react/features/toolbox/components/native/ScreenSharingIosButton.js
@@ -3,11 +3,11 @@
import React from 'react';
import { NativeModules, Platform, findNodeHandle } from 'react-native';
import { ScreenCapturePickerView } from 'react-native-webrtc';
+import { connect } from 'react-redux';
import { IOS_SCREENSHARING_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconScreenshare } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalVideoTrackDesktop } from '../../../base/tracks';
diff --git a/react/features/toolbox/components/native/ToggleCameraButton.js b/react/features/toolbox/components/native/ToggleCameraButton.js
index 7a298e2216..526e70c92d 100644
--- a/react/features/toolbox/components/native/ToggleCameraButton.js
+++ b/react/features/toolbox/components/native/ToggleCameraButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconCameraRefresh } from '../../../base/icons';
import { MEDIA_TYPE, toggleCameraFacingMode } from '../../../base/media';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalTrackMuted } from '../../../base/tracks';
diff --git a/react/features/toolbox/components/native/ToggleSelfViewButton.js b/react/features/toolbox/components/native/ToggleSelfViewButton.js
index e24f26ff33..d67d6f937d 100644
--- a/react/features/toolbox/components/native/ToggleSelfViewButton.js
+++ b/react/features/toolbox/components/native/ToggleSelfViewButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconAudioOnlyOff } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { updateSettings } from '../../../base/settings';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
diff --git a/react/features/toolbox/components/native/Toolbox.js b/react/features/toolbox/components/native/Toolbox.js
index 69f924d7fb..ec9bbe4309 100644
--- a/react/features/toolbox/components/native/Toolbox.js
+++ b/react/features/toolbox/components/native/Toolbox.js
@@ -3,10 +3,10 @@
import React from 'react';
import { View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
+import { connect } from 'react-redux';
import { ColorSchemeRegistry } from '../../../base/color-scheme';
import { Platform } from '../../../base/react';
-import { connect } from '../../../base/redux';
import { StyleType } from '../../../base/styles';
import { ChatButton } from '../../../chat';
import { ReactionsMenuButton } from '../../../reactions/components';
diff --git a/react/features/toolbox/components/web/AudioSettingsButton.js b/react/features/toolbox/components/web/AudioSettingsButton.js
index 04228bbfc5..89ce05ea70 100644
--- a/react/features/toolbox/components/web/AudioSettingsButton.js
+++ b/react/features/toolbox/components/web/AudioSettingsButton.js
@@ -1,12 +1,12 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
import { IconArrowUp } from '../../../base/icons';
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
-import { connect } from '../../../base/redux';
import { ToolboxButtonWithIcon } from '../../../base/toolbox/components';
import { AudioSettingsPopup, toggleAudioSettings } from '../../../settings';
import { getAudioSettingsVisibility } from '../../../settings/functions';
@@ -18,12 +18,12 @@ type Props = {
/**
* The button's key.
*/
- buttonKey?: string,
+ buttonKey?: string,
/**
* External handler for click action.
*/
- handleClick: Function,
+ handleClick: Function,
/**
* Indicates whether audio permissions have been granted or denied.
diff --git a/react/features/toolbox/components/web/FullscreenButton.js b/react/features/toolbox/components/web/FullscreenButton.js
index a6c31bb892..e179b0328f 100644
--- a/react/features/toolbox/components/web/FullscreenButton.js
+++ b/react/features/toolbox/components/web/FullscreenButton.js
@@ -1,16 +1,17 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconEnterFullscreen, IconExitFullscreen } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
type Props = AbstractButtonProps & {
- /**
- * Whether or not the app is currently in full screen.
- */
- _fullScreen: boolean,
+ /**
+ * Whether or not the app is currently in full screen.
+ */
+ _fullScreen: boolean,
};
/**
diff --git a/react/features/toolbox/components/web/LinkToSalesforceButton.js b/react/features/toolbox/components/web/LinkToSalesforceButton.js
index 2dec1ce533..1d6026d695 100644
--- a/react/features/toolbox/components/web/LinkToSalesforceButton.js
+++ b/react/features/toolbox/components/web/LinkToSalesforceButton.js
@@ -1,17 +1,18 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { openDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { IconCloudUpload } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { SalesforceLinkDialog } from '../../../salesforce/components';
/**
* The type of the React {@code Component} props of {@link LinkToSalesforce}.
*/
- type Props = AbstractButtonProps & {
+type Props = AbstractButtonProps & {
/**
* The redux {@code dispatch} function.
diff --git a/react/features/toolbox/components/web/ProfileButton.js b/react/features/toolbox/components/web/ProfileButton.js
index d37b4aeab1..e1c9c83ce5 100644
--- a/react/features/toolbox/components/web/ProfileButton.js
+++ b/react/features/toolbox/components/web/ProfileButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { translate } from '../../../base/i18n';
import { getLocalParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { SETTINGS_TABS, openSettingsDialog } from '../../../settings';
@@ -22,12 +23,12 @@ type Props = AbstractButtonProps & {
/**
* The redux representation of the local participant.
*/
- _localParticipant: Object,
+ _localParticipant: Object,
- /**
+ /**
* Whether the button support clicking or not.
*/
- _unclickable: boolean,
+ _unclickable: boolean,
/**
* The redux {@code dispatch} function.
diff --git a/react/features/toolbox/components/web/ProfileButtonAvatar.js b/react/features/toolbox/components/web/ProfileButtonAvatar.js
index 1171639e3b..43c5c9610c 100644
--- a/react/features/toolbox/components/web/ProfileButtonAvatar.js
+++ b/react/features/toolbox/components/web/ProfileButtonAvatar.js
@@ -1,11 +1,11 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { translate } from '../../../base/i18n';
import { getLocalParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
/**
* The type of the React {@code Component} props of
diff --git a/react/features/toolbox/components/web/ShareDesktopButton.js b/react/features/toolbox/components/web/ShareDesktopButton.js
index 6705a6c589..4cf72a3fa7 100644
--- a/react/features/toolbox/components/web/ShareDesktopButton.js
+++ b/react/features/toolbox/components/web/ShareDesktopButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconScreenshare, IconStopScreenshare } from '../../../base/icons';
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isScreenVideoShared } from '../../../screen-share/functions';
import { isDesktopShareButtonDisabled } from '../../functions';
diff --git a/react/features/toolbox/components/web/ToggleCameraButton.js b/react/features/toolbox/components/web/ToggleCameraButton.js
index cea35cf58c..03e6391056 100644
--- a/react/features/toolbox/components/web/ToggleCameraButton.js
+++ b/react/features/toolbox/components/web/ToggleCameraButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconCameraRefresh } from '../../../base/icons';
import { MEDIA_TYPE } from '../../../base/media';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalTrackMuted, isToggleCameraEnabled, toggleCamera } from '../../../base/tracks';
import { setOverflowMenuVisible } from '../../actions.web';
@@ -66,7 +67,7 @@ class ToggleCameraButton extends AbstractButton<Props, any> {
* @param {Object} state - The Redux state.
* @returns {Props}
*/
-function mapStateToProps(state): Object {
+function mapStateToProps(state) {
const { enabled: audioOnly } = state['features/base/audio-only'];
const tracks = state['features/base/tracks'];
diff --git a/react/features/toolbox/components/web/VideoSettingsButton.js b/react/features/toolbox/components/web/VideoSettingsButton.js
index 1945fce16a..9e48144925 100644
--- a/react/features/toolbox/components/web/VideoSettingsButton.js
+++ b/react/features/toolbox/components/web/VideoSettingsButton.js
@@ -1,11 +1,11 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
import { IconArrowUp } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { ToolboxButtonWithIcon } from '../../../base/toolbox/components';
import { getLocalJitsiVideoTrack } from '../../../base/tracks';
import { VideoSettingsPopup, toggleVideoSettings } from '../../../settings';
@@ -19,7 +19,7 @@ type Props = {
/**
* The button's key.
*/
- buttonKey?: string,
+ buttonKey?: string,
/**
* External handler for click action.
diff --git a/react/features/transcribing/components/TranscribingLabel.native.js b/react/features/transcribing/components/TranscribingLabel.native.js
index 02ab25ee21..7501cdb9f9 100644
--- a/react/features/transcribing/components/TranscribingLabel.native.js
+++ b/react/features/transcribing/components/TranscribingLabel.native.js
@@ -1,10 +1,10 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
import { Label } from '../../base/label';
-import { connect } from '../../base/redux';
import { type Props, _mapStateToProps } from './AbstractTranscribingLabel';
diff --git a/react/features/video-layout/components/TileViewButton.js b/react/features/video-layout/components/TileViewButton.js
index 0832795ef8..125a476118 100644
--- a/react/features/video-layout/components/TileViewButton.js
+++ b/react/features/video-layout/components/TileViewButton.js
@@ -1,5 +1,5 @@
// @flow
-import { batch } from 'react-redux';
+import { batch, connect } from 'react-redux';
import type { Dispatch } from 'redux';
import {
@@ -9,7 +9,6 @@ import {
import { TILE_VIEW_ENABLED, getFeatureFlag } from '../../base/flags';
import { translate } from '../../base/i18n';
import { IconTileView } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
import { setOverflowMenuVisible } from '../../toolbox/actions';
import { setTileView } from '../actions';
diff --git a/react/features/video-menu/components/AbstractGrantModeratorDialog.ts b/react/features/video-menu/components/AbstractGrantModeratorDialog.ts
index 1b2ae5b8df..00efb39b25 100644
--- a/react/features/video-menu/components/AbstractGrantModeratorDialog.ts
+++ b/react/features/video-menu/components/AbstractGrantModeratorDialog.ts
@@ -22,7 +22,7 @@ interface IProps extends WithTranslation {
/**
* The name of the remote participant to be granted moderator rights.
*/
- participantName: string;
+ participantName?: string;
}
/**
diff --git a/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts b/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
index 0a8b6bd5d3..bd23df4875 100644
--- a/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
@@ -16,16 +16,16 @@ import AbstractMuteRemoteParticipantDialog, {
* {@link AbstractMuteEveryoneDialog}.
*/
export type Props = AbstractProps & WithTranslation & {
- content: string;
+ content?: string;
exclude: Array<string>;
- isAudioModerationEnabled: boolean;
- isModerationSupported: boolean;
+ isAudioModerationEnabled?: boolean;
+ isModerationSupported?: boolean;
showAdvancedModerationToggle: boolean;
title: string;
};
interface IState {
- audioModerationEnabled: boolean;
+ audioModerationEnabled?: boolean;
content: string;
}
diff --git a/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts b/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
index 4787ea4b1d..ac7ca6611a 100644
--- a/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
@@ -8,7 +8,7 @@ import { getLocalParticipant, getParticipantDisplayName } from '../../base/parti
import { muteAllParticipants } from '../actions';
import AbstractMuteRemoteParticipantsVideoDialog, {
- type Props as AbstractProps
+ type IProps as AbstractProps
} from './AbstractMuteRemoteParticipantsVideoDialog';
/**
@@ -16,17 +16,17 @@ import AbstractMuteRemoteParticipantsVideoDialog, {
* {@link AbstractMuteEveryonesVideoDialog}.
*/
export type Props = AbstractProps & WithTranslation & {
- content: string;
+ content?: string;
exclude: Array<string>;
- isModerationSupported: boolean;
- isVideoModerationEnabled: boolean;
+ isModerationSupported?: boolean;
+ isVideoModerationEnabled?: boolean;
showAdvancedModerationToggle: boolean;
title: string;
};
interface IState {
content: string;
- moderationEnabled: boolean;
+ moderationEnabled?: boolean;
}
/**
diff --git a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.ts b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.ts
index 87fea6a676..b70e49d362 100644
--- a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.ts
@@ -1,4 +1,5 @@
import { Component } from 'react';
+import { WithTranslation } from 'react-i18next';
import { IReduxState } from '../../app/types';
import { rejectParticipantVideo } from '../../av-moderation/actions';
@@ -10,7 +11,7 @@ import { muteRemote } from '../actions';
* The type of the React {@code Component} props of
* {@link AbstractMuteRemoteParticipantsVideoDialog}.
*/
-export type Props = {
+export interface IProps extends WithTranslation {
/**
* The Redux dispatch function.
@@ -26,19 +27,14 @@ export type Props = {
* The ID of the remote participant to be muted.
*/
participantID: string;
-
- /**
- * Function to translate i18n labels.
- */
- t: Function;
-};
+}
/**
* Abstract dialog to confirm a remote participant video ute action.
*
* @augments Component
*/
-export default class AbstractMuteRemoteParticipantsVideoDialog<P extends Props = Props, State=void>
+export default class AbstractMuteRemoteParticipantsVideoDialog<P extends IProps = IProps, State=any>
extends Component<P, State> {
/**
* Initializes a new {@code AbstractMuteRemoteParticipantsVideoDialog} instance.
diff --git a/react/features/video-menu/components/native/AskUnmuteButton.js b/react/features/video-menu/components/native/AskUnmuteButton.js
index 3078a1755a..846820b356 100644
--- a/react/features/video-menu/components/native/AskUnmuteButton.js
+++ b/react/features/video-menu/components/native/AskUnmuteButton.js
@@ -1,12 +1,13 @@
// @flow
+import { connect } from 'react-redux';
+
import { approveParticipant } from '../../../av-moderation/actions';
import { isSupported } from '../../../av-moderation/functions';
import { translate } from '../../../base/i18n';
import { IconMic, IconVideo } from '../../../base/icons';
import { MEDIA_TYPE } from '../../../base/media';
import { getParticipantById, isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isForceMuted } from '../../../participants-pane/functions';
diff --git a/react/features/video-menu/components/native/ConnectionStatusButton.js b/react/features/video-menu/components/native/ConnectionStatusButton.js
index 93c169dd1a..ebc8c95a9f 100644
--- a/react/features/video-menu/components/native/ConnectionStatusButton.js
+++ b/react/features/video-menu/components/native/ConnectionStatusButton.js
@@ -1,7 +1,8 @@
+import { connect } from 'react-redux';
+
import { openSheet } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { IconInfoCircle } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import ConnectionStatusComponent from './ConnectionStatusComponent';
diff --git a/react/features/video-menu/components/native/ConnectionStatusComponent.tsx b/react/features/video-menu/components/native/ConnectionStatusComponent.tsx
index 8b0f355e1f..1405c2a631 100644
--- a/react/features/video-menu/components/native/ConnectionStatusComponent.tsx
+++ b/react/features/video-menu/components/native/ConnectionStatusComponent.tsx
@@ -1,8 +1,10 @@
/* eslint-disable lines-around-comment */
import React, { PureComponent } from 'react';
+import { WithTranslation } from 'react-i18next';
import { Text, View } from 'react-native';
import { withTheme } from 'react-native-paper';
+import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
// @ts-ignore
@@ -18,7 +20,6 @@ import { MEDIA_TYPE } from '../../../base/media/constants';
import { getParticipantDisplayName } from '../../../base/participants/functions';
// @ts-ignore
import BaseIndicator from '../../../base/react/components/native/BaseIndicator';
-import { connect } from '../../../base/redux/functions';
import {
getTrackByMediaTypeAndParticipant
} from '../../../base/tracks/functions.native';
@@ -57,7 +58,7 @@ const CONNECTION_QUALITY = [
}
];
-type IProps = {
+interface IProps extends WithTranslation {
/**
* Whether this participant's connection is inactive.
@@ -89,16 +90,11 @@ type IProps = {
*/
participantID: string;
- /**
- * The function to be used to translate i18n labels.
- */
- t: Function;
-
/**
* Theme used for styles.
*/
theme: any;
-};
+}
/**
* The type of the React {@code Component} state of {@link ConnectionStatusComponent}.
@@ -484,5 +480,4 @@ function _mapStateToProps(state: IReduxState, ownProps: IProps) {
};
}
-// @ts-ignore
export default translate(connect(_mapStateToProps)(withTheme(ConnectionStatusComponent)));
diff --git a/react/features/video-menu/components/native/GrantModeratorButton.js b/react/features/video-menu/components/native/GrantModeratorButton.js
index 0f02a15d6f..8d1c46ee00 100644
--- a/react/features/video-menu/components/native/GrantModeratorButton.js
+++ b/react/features/video-menu/components/native/GrantModeratorButton.js
@@ -1,7 +1,8 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractGrantModeratorButton, {
_mapStateToProps
} from '../AbstractGrantModeratorButton';
diff --git a/react/features/video-menu/components/native/GrantModeratorDialog.js b/react/features/video-menu/components/native/GrantModeratorDialog.js
index 677b41e3e4..87aa3bde0c 100644
--- a/react/features/video-menu/components/native/GrantModeratorDialog.js
+++ b/react/features/video-menu/components/native/GrantModeratorDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractGrantModeratorDialog, { abstractMapStateToProps }
from '../AbstractGrantModeratorDialog';
diff --git a/react/features/video-menu/components/native/KickButton.js b/react/features/video-menu/components/native/KickButton.js
index 6c72287a48..d18a987e56 100644
--- a/react/features/video-menu/components/native/KickButton.js
+++ b/react/features/video-menu/components/native/KickButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import AbstractKickButton from '../AbstractKickButton';
/**
diff --git a/react/features/video-menu/components/native/KickRemoteParticipantDialog.js b/react/features/video-menu/components/native/KickRemoteParticipantDialog.js
index 64503e588e..bdd2f5da35 100644
--- a/react/features/video-menu/components/native/KickRemoteParticipantDialog.js
+++ b/react/features/video-menu/components/native/KickRemoteParticipantDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractKickRemoteParticipantDialog
from '../AbstractKickRemoteParticipantDialog';
diff --git a/react/features/video-menu/components/native/LocalVideoMenu.js b/react/features/video-menu/components/native/LocalVideoMenu.js
index 33347eb8e0..b944dcf458 100644
--- a/react/features/video-menu/components/native/LocalVideoMenu.js
+++ b/react/features/video-menu/components/native/LocalVideoMenu.js
@@ -1,5 +1,6 @@
import React, { PureComponent } from 'react';
import { Text, View } from 'react-native';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { BottomSheet } from '../../../base/dialog';
@@ -9,7 +10,6 @@ import {
getLocalParticipant,
getParticipantDisplayName
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import ToggleSelfViewButton from '../../../toolbox/components/native/ToggleSelfViewButton';
import ConnectionStatusButton from './ConnectionStatusButton';
diff --git a/react/features/video-menu/components/native/MuteButton.js b/react/features/video-menu/components/native/MuteButton.js
index bebd7ebfa8..d7d3363c77 100644
--- a/react/features/video-menu/components/native/MuteButton.js
+++ b/react/features/video-menu/components/native/MuteButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import AbstractMuteButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractMuteButton';
/**
diff --git a/react/features/video-menu/components/native/MuteEveryoneDialog.js b/react/features/video-menu/components/native/MuteEveryoneDialog.js
index 7c8ea748f1..b619b95214 100644
--- a/react/features/video-menu/components/native/MuteEveryoneDialog.js
+++ b/react/features/video-menu/components/native/MuteEveryoneDialog.js
@@ -1,10 +1,10 @@
import React from 'react';
import Dialog from 'react-native-dialog';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractMuteEveryoneDialog, {
type Props,
abstractMapStateToProps as _mapStateToProps } from '../AbstractMuteEveryoneDialog';
diff --git a/react/features/video-menu/components/native/MuteEveryoneElseButton.js b/react/features/video-menu/components/native/MuteEveryoneElseButton.js
index a794e09a2b..f3e97f2698 100644
--- a/react/features/video-menu/components/native/MuteEveryoneElseButton.js
+++ b/react/features/video-menu/components/native/MuteEveryoneElseButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import AbstractMuteEveryoneElseButton from '../AbstractMuteEveryoneElseButton';
/**
diff --git a/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js b/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
index 695209ad15..0c198c39fe 100644
--- a/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
+++ b/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
@@ -1,10 +1,10 @@
import React from 'react';
import Dialog from 'react-native-dialog';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractMuteEveryonesVideoDialog, {
type Props,
abstractMapStateToProps as _mapStateToProps } from '../AbstractMuteEveryonesVideoDialog';
diff --git a/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js
index 319b8ba544..d659616dbd 100644
--- a/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js
+++ b/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import AbstractMuteRemoteParticipantsVideoDialog, {
abstractMapStateToProps
} from '../AbstractMuteRemoteParticipantsVideoDialog';
diff --git a/react/features/video-menu/components/native/MuteVideoButton.js b/react/features/video-menu/components/native/MuteVideoButton.js
index ab78d33c25..cfd3478904 100644
--- a/react/features/video-menu/components/native/MuteVideoButton.js
+++ b/react/features/video-menu/components/native/MuteVideoButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import AbstractMuteVideoButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractMuteVideoButton';
/**
diff --git a/react/features/video-menu/components/native/PinButton.js b/react/features/video-menu/components/native/PinButton.js
index 652c31c93d..06026cc8c1 100644
--- a/react/features/video-menu/components/native/PinButton.js
+++ b/react/features/video-menu/components/native/PinButton.js
@@ -1,9 +1,10 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../../base/i18n';
import { IconEnlarge } from '../../../base/icons';
import { pinParticipant } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { shouldDisplayTileView } from '../../../video-layout/functions';
diff --git a/react/features/video-menu/components/native/RemoteVideoMenu.js b/react/features/video-menu/components/native/RemoteVideoMenu.js
index 866fe6e33d..a284acf59b 100644
--- a/react/features/video-menu/components/native/RemoteVideoMenu.js
+++ b/react/features/video-menu/components/native/RemoteVideoMenu.js
@@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import { Text, View } from 'react-native';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { BottomSheet, hideSheet } from '../../../base/dialog';
@@ -12,7 +13,6 @@ import {
getParticipantDisplayName,
isLocalParticipantModerator
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { getBreakoutRooms, getCurrentRoomId } from '../../../breakout-rooms/functions';
import PrivateMessageButton from '../../../chat/components/native/PrivateMessageButton';
import ConnectionStatusButton from '../native/ConnectionStatusButton';
diff --git a/react/features/video-menu/components/native/SendToBreakoutRoom.js b/react/features/video-menu/components/native/SendToBreakoutRoom.js
index ffbe013639..4dedd921e0 100644
--- a/react/features/video-menu/components/native/SendToBreakoutRoom.js
+++ b/react/features/video-menu/components/native/SendToBreakoutRoom.js
@@ -1,10 +1,11 @@
// @flow
+import { connect } from 'react-redux';
+
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../analytics';
import { translate } from '../../../base/i18n';
import { IconRingGroup } from '../../../base/icons';
import { isLocalParticipantModerator } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { sendParticipantToRoom } from '../../../breakout-rooms/actions';
diff --git a/react/features/video-menu/components/native/SharedVideoMenu.js b/react/features/video-menu/components/native/SharedVideoMenu.js
index 18a6cdb7b2..756e9d1577 100644
--- a/react/features/video-menu/components/native/SharedVideoMenu.js
+++ b/react/features/video-menu/components/native/SharedVideoMenu.js
@@ -3,6 +3,7 @@
import React, { PureComponent } from 'react';
import { Text, View } from 'react-native';
import { Divider } from 'react-native-paper';
+import { connect } from 'react-redux';
import { Avatar } from '../../../base/avatar';
import { BottomSheet, hideSheet } from '../../../base/dialog';
@@ -11,7 +12,6 @@ import {
getParticipantById,
getParticipantDisplayName
} from '../../../base/participants';
-import { connect } from '../../../base/redux';
import { SharedVideoButton } from '../../../shared-video/components';
import styles from './styles';
diff --git a/react/features/video-menu/components/native/VolumeSlider.js b/react/features/video-menu/components/native/VolumeSlider.js
index 31add73acf..8c11877171 100644
--- a/react/features/video-menu/components/native/VolumeSlider.js
+++ b/react/features/video-menu/components/native/VolumeSlider.js
@@ -5,9 +5,9 @@ import _ from 'lodash';
import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { withTheme } from 'react-native-paper';
+import { connect } from 'react-redux';
import { Icon, IconVolumeUp } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import { setVolume } from '../../../participants-pane/actions.native';
import { VOLUME_SLIDER_SCALE } from '../../constants';
diff --git a/react/features/video-menu/components/web/ConnectionStatusButton.js b/react/features/video-menu/components/web/ConnectionStatusButton.js
index 027140a89a..76e1744c94 100644
--- a/react/features/video-menu/components/web/ConnectionStatusButton.js
+++ b/react/features/video-menu/components/web/ConnectionStatusButton.js
@@ -1,9 +1,9 @@
// @flow
import React, { useCallback } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconInfoCircle } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import { renderConnectionStatus } from '../../actions.web';
diff --git a/react/features/video-menu/components/web/FlipLocalVideoButton.js b/react/features/video-menu/components/web/FlipLocalVideoButton.js
index 40406ae515..f4cea085d1 100644
--- a/react/features/video-menu/components/web/FlipLocalVideoButton.js
+++ b/react/features/video-menu/components/web/FlipLocalVideoButton.js
@@ -1,9 +1,9 @@
/* @flow */
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import { updateSettings } from '../../../base/settings';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
diff --git a/react/features/video-menu/components/web/GrantModeratorButton.js b/react/features/video-menu/components/web/GrantModeratorButton.js
index d91b0e0efd..61169ddb1b 100644
--- a/react/features/video-menu/components/web/GrantModeratorButton.js
+++ b/react/features/video-menu/components/web/GrantModeratorButton.js
@@ -1,10 +1,10 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconModerator } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractGrantModeratorButton, {
type Props,
diff --git a/react/features/video-menu/components/web/GrantModeratorDialog.tsx b/react/features/video-menu/components/web/GrantModeratorDialog.tsx
index 4cde008f77..4fa80dcab5 100644
--- a/react/features/video-menu/components/web/GrantModeratorDialog.tsx
+++ b/react/features/video-menu/components/web/GrantModeratorDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import AbstractGrantModeratorDialog, { abstractMapStateToProps } from '../AbstractGrantModeratorDialog';
diff --git a/react/features/video-menu/components/web/HideSelfViewVideoButton.js b/react/features/video-menu/components/web/HideSelfViewVideoButton.js
index b579cba062..f226c9e3e3 100644
--- a/react/features/video-menu/components/web/HideSelfViewVideoButton.js
+++ b/react/features/video-menu/components/web/HideSelfViewVideoButton.js
@@ -1,9 +1,9 @@
/* @flow */
import React, { PureComponent } from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
-import { connect } from '../../../base/redux';
import { getHideSelfView, updateSettings } from '../../../base/settings';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
diff --git a/react/features/video-menu/components/web/KickButton.js b/react/features/video-menu/components/web/KickButton.js
index 0450f92d25..c9c30f00af 100644
--- a/react/features/video-menu/components/web/KickButton.js
+++ b/react/features/video-menu/components/web/KickButton.js
@@ -1,10 +1,10 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconUserDeleted } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractKickButton, {
type Props
diff --git a/react/features/video-menu/components/web/KickRemoteParticipantDialog.tsx b/react/features/video-menu/components/web/KickRemoteParticipantDialog.tsx
index c6795ab661..3e857bf9ae 100644
--- a/react/features/video-menu/components/web/KickRemoteParticipantDialog.tsx
+++ b/react/features/video-menu/components/web/KickRemoteParticipantDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import AbstractKickRemoteParticipantDialog from '../AbstractKickRemoteParticipantDialog';
diff --git a/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.tsx b/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.tsx
index 1acc675d96..349001b1c7 100644
--- a/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.tsx
+++ b/react/features/video-menu/components/web/LocalVideoMenuTriggerButton.tsx
@@ -220,7 +220,6 @@ class LocalVideoMenuTriggerButton extends Component<IProps> {
id = 'local-video-menu-trigger'
onPopoverClose = { this._onPopoverClose }
onPopoverOpen = { this._onPopoverOpen }
- overflowDrawer = { _overflowDrawer }
position = { _menuPosition }
visible = { popoverVisible }>
{buttonVisible && !isMobileBrowser() && (
diff --git a/react/features/video-menu/components/web/MuteButton.js b/react/features/video-menu/components/web/MuteButton.js
index cfa5d80891..65a720b1aa 100644
--- a/react/features/video-menu/components/web/MuteButton.js
+++ b/react/features/video-menu/components/web/MuteButton.js
@@ -1,10 +1,10 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconMicSlash } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractMuteButton, {
type Props,
diff --git a/react/features/video-menu/components/web/MuteEveryoneDialog.tsx b/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
index 17cf038100..1c0597cdb3 100644
--- a/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
+++ b/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Switch from '../../../base/ui/components/web/Switch';
import AbstractMuteEveryoneDialog, { type Props, abstractMapStateToProps }
diff --git a/react/features/video-menu/components/web/MuteEveryoneElseButton.js b/react/features/video-menu/components/web/MuteEveryoneElseButton.js
index a6cd6fd7c4..1242637393 100644
--- a/react/features/video-menu/components/web/MuteEveryoneElseButton.js
+++ b/react/features/video-menu/components/web/MuteEveryoneElseButton.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconMicSlash } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractMuteEveryoneElseButton, {
type Props
diff --git a/react/features/video-menu/components/web/MuteEveryoneElsesVideoButton.js b/react/features/video-menu/components/web/MuteEveryoneElsesVideoButton.js
index 797a151fb6..bf1a966e81 100644
--- a/react/features/video-menu/components/web/MuteEveryoneElsesVideoButton.js
+++ b/react/features/video-menu/components/web/MuteEveryoneElsesVideoButton.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconVideoOff } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractMuteEveryoneElsesVideoButton, {
type Props
diff --git a/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx b/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
index 98860b2581..073f7a47d5 100644
--- a/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
+++ b/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Switch from '../../../base/ui/components/web/Switch';
import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps }
diff --git a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.tsx b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.tsx
index 8caa7927a7..c0d52ebba4 100644
--- a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.tsx
+++ b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.tsx
@@ -1,7 +1,7 @@
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
-import { connect } from '../../../base/redux/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import AbstractMuteRemoteParticipantsVideoDialog, {
abstractMapStateToProps
@@ -37,5 +37,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi
}
}
-// @ts-ignore
export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));
diff --git a/react/features/video-menu/components/web/MuteVideoButton.js b/react/features/video-menu/components/web/MuteVideoButton.js
index 11150091d0..48cbb18188 100644
--- a/react/features/video-menu/components/web/MuteVideoButton.js
+++ b/react/features/video-menu/components/web/MuteVideoButton.js
@@ -1,10 +1,10 @@
/* @flow */
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../../base/i18n';
import { IconVideoOff } from '../../../base/icons';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import AbstractMuteVideoButton, {
type Props,
diff --git a/react/features/video-menu/components/web/PrivateMessageMenuButton.js b/react/features/video-menu/components/web/PrivateMessageMenuButton.js
index 4774bdd761..d2a42142bd 100644
--- a/react/features/video-menu/components/web/PrivateMessageMenuButton.js
+++ b/react/features/video-menu/components/web/PrivateMessageMenuButton.js
@@ -1,12 +1,12 @@
// @flow
import React, { Component } from 'react';
+import { connect } from 'react-redux';
import { CHAT_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconMessage } from '../../../base/icons';
import { getParticipantById } from '../../../base/participants';
-import { connect } from '../../../base/redux';
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
import { openChat } from '../../../chat/actions.web';
import {
@@ -85,7 +85,7 @@ class PrivateMessageMenuButton extends Component<Props> {
* @param {Props} ownProps - The own props of the component.
* @returns {Props}
*/
-function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
+function _mapStateToProps(state: Object, ownProps: Props) {
const enabled = getFeatureFlag(state, CHAT_ENABLED, true);
const { visible = enabled } = ownProps;
diff --git a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.tsx b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.tsx
index 9a50cb79e0..6c7fd878a6 100644
--- a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.tsx
+++ b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.tsx
@@ -47,11 +47,6 @@ interface IProps extends WithTranslation {
*/
_menuPosition: string;
- /**
- * Whether to display the Popover as a drawer.
- */
- _overflowDrawer: boolean;
-
/**
* Participant reference.
*/
@@ -165,7 +160,6 @@ class RemoteVideoMenuTriggerButton extends Component<IProps> {
render() {
const {
_disabled,
- _overflowDrawer,
_showConnectionInfo,
_participantDisplayName,
buttonVisible,
@@ -194,7 +188,6 @@ class RemoteVideoMenuTriggerButton extends Component<IProps> {
id = 'remote-video-menu-trigger'
onPopoverClose = { this._onPopoverClose }
onPopoverOpen = { this._onPopoverOpen }
- overflowDrawer = { _overflowDrawer }
position = { this.props._menuPosition }
visible = { popoverVisible }>
{ buttonVisible && !_disabled && (
@@ -287,7 +280,6 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
const { active, controller } = state['features/remote-control'];
const { requestedParticipant, controlled } = controller;
const activeParticipant = requestedParticipant || controlled;
- const { overflowDrawer } = state['features/toolbox'];
const { showConnectionInfo } = state['features/base/connection'];
const { remoteVideoMenu } = state['features/base/config'];
const { ownerId } = state['features/shared-video'];
@@ -323,7 +315,6 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
_disabled: Boolean(remoteVideoMenu?.disabled),
_localVideoOwner: Boolean(ownerId === localParticipantId),
_menuPosition,
- _overflowDrawer: overflowDrawer,
_participant: participant ?? { id: '' },
_participantDisplayName: _participantDisplayName ?? '',
_remoteControlState,
diff --git a/react/features/video-quality/components/VideoQualityLabel.native.js b/react/features/video-quality/components/VideoQualityLabel.native.js
index 415b2e8b96..92ceb96762 100644
--- a/react/features/video-quality/components/VideoQualityLabel.native.js
+++ b/react/features/video-quality/components/VideoQualityLabel.native.js
@@ -1,10 +1,10 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
import { Label } from '../../base/label';
-import { connect } from '../../base/redux';
import { type StyleType, combineStyles } from '../../base/styles';
import AbstractVideoQualityLabel, {
diff --git a/react/features/video-quality/components/VideoQualityLabel.web.js b/react/features/video-quality/components/VideoQualityLabel.web.js
index 7a1f504299..6ad17b309c 100644
--- a/react/features/video-quality/components/VideoQualityLabel.web.js
+++ b/react/features/video-quality/components/VideoQualityLabel.web.js
@@ -1,13 +1,13 @@
// @flow
import React from 'react';
+import { connect } from 'react-redux';
import { openDialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
import { IconPerformance } from '../../base/icons';
import { Label } from '../../base/label';
import { COLORS } from '../../base/label/constants';
-import { connect } from '../../base/redux';
import Tooltip from '../../base/tooltip/components/Tooltip';
import { shouldDisplayTileView } from '../../video-layout';
diff --git a/react/features/video-quality/components/VideoQualitySlider.web.tsx b/react/features/video-quality/components/VideoQualitySlider.web.tsx
index 9f8446034c..c517392046 100644
--- a/react/features/video-quality/components/VideoQualitySlider.web.tsx
+++ b/react/features/video-quality/components/VideoQualitySlider.web.tsx
@@ -3,6 +3,7 @@ import { withStyles } from '@mui/styles';
import clsx from 'clsx';
import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next';
+import { connect } from 'react-redux';
import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
@@ -11,7 +12,6 @@ import { setAudioOnly } from '../../base/audio-only/actions';
import { translate } from '../../base/i18n/functions';
import { setLastN } from '../../base/lastn/actions';
import { getLastNForQualityLevel } from '../../base/lastn/functions';
-import { connect } from '../../base/redux/functions';
import { withPixelLineHeight } from '../../base/styles/functions.web';
import { setPreferredVideoQuality } from '../actions';
import { DEFAULT_LAST_N, VIDEO_QUALITY_LEVELS } from '../constants';
@@ -55,12 +55,12 @@ interface IProps extends WithTranslation {
/**
* The channelLastN value configured for the conference.
*/
- _channelLastN: number;
+ _channelLastN?: number;
/**
* Whether or not the conference is in peer to peer mode.
*/
- _p2p: Boolean;
+ _p2p?: Object;
/**
* The currently configured maximum quality resolution to be sent and
diff --git a/react/features/virtual-background/components/VideoBackgroundButton.js b/react/features/virtual-background/components/VideoBackgroundButton.js
index 16729a5cb9..d49bcd0350 100644
--- a/react/features/virtual-background/components/VideoBackgroundButton.js
+++ b/react/features/virtual-background/components/VideoBackgroundButton.js
@@ -1,8 +1,9 @@
// @flow
+import { connect } from 'react-redux';
+
import { translate } from '../../base/i18n';
import { IconImage } from '../../base/icons';
-import { connect } from '../../base/redux';
import { AbstractButton } from '../../base/toolbox/components';
import type { AbstractButtonProps } from '../../base/toolbox/components';
import { openSettingsDialog } from '../../settings/actions';
diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.js
index e3fd66786f..4017512ab4 100644
--- a/react/features/welcome/components/WelcomePage.native.js
+++ b/react/features/welcome/components/WelcomePage.native.js
@@ -1,11 +1,11 @@
import React from 'react';
import { Animated, SafeAreaView, TouchableHighlight, View } from 'react-native';
+import { connect } from 'react-redux';
import { getName } from '../../app/functions';
import { translate } from '../../base/i18n';
import { Icon, IconWarning } from '../../base/icons';
import { LoadingIndicator, Text } from '../../base/react';
-import { connect } from '../../base/redux';
import BaseTheme from '../../base/ui/components/BaseTheme.native';
import Button from '../../base/ui/components/native/Button';
import Input from '../../base/ui/components/native/Input';
diff --git a/react/features/welcome/components/WelcomePage.web.js b/react/features/welcome/components/WelcomePage.web.js
index a2ba77d497..a7ab057414 100644
--- a/react/features/welcome/components/WelcomePage.web.js
+++ b/react/features/welcome/components/WelcomePage.web.js
@@ -1,12 +1,12 @@
/* global interfaceConfig */
import React from 'react';
+import { connect } from 'react-redux';
import { isMobileBrowser } from '../../base/environment/utils';
import { translate, translateToHTML } from '../../base/i18n';
import { Icon, IconWarning } from '../../base/icons';
import { Watermarks } from '../../base/react';
-import { connect } from '../../base/redux';
import { CalendarList } from '../../calendar-sync';
import { RecentList } from '../../recent-list';
import { SETTINGS_TABS, SettingsButton } from '../../settings';
diff --git a/react/features/whiteboard/components/web/WhiteboardButton.tsx b/react/features/whiteboard/components/web/WhiteboardButton.tsx
index 5eb5adad5a..348b40d122 100644
--- a/react/features/whiteboard/components/web/WhiteboardButton.tsx
+++ b/react/features/whiteboard/components/web/WhiteboardButton.tsx
@@ -1,7 +1,8 @@
+import { connect } from 'react-redux';
+
import { IReduxState, IStore } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
import { IconWhiteboard, IconWhiteboardHide } from '../../../base/icons/svg';
-import { connect } from '../../../base/redux/functions';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';