diff --git a/react/features/authentication/components/WaitForOwnerDialog.native.js b/react/features/authentication/components/WaitForOwnerDialog.native.js index 7ac1461c8..a3e3514e6 100644 --- a/react/features/authentication/components/WaitForOwnerDialog.native.js +++ b/react/features/authentication/components/WaitForOwnerDialog.native.js @@ -1,11 +1,11 @@ // @flow 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'; diff --git a/react/features/base/app/components/BaseApp.js b/react/features/base/app/components/BaseApp.js index 257686407..1aaba72ea 100644 --- a/react/features/base/app/components/BaseApp.js +++ b/react/features/base/app/components/BaseApp.js @@ -55,8 +55,6 @@ export default class BaseApp extends Component<*, State> { this.state = { route: {}, - - // $FlowFixMe store: undefined }; } diff --git a/react/features/base/dialog/components/native/BottomSheet.js b/react/features/base/dialog/components/native/BottomSheet.js index 2ae6bdea4..3fbefce4e 100644 --- a/react/features/base/dialog/components/native/BottomSheet.js +++ b/react/features/base/dialog/components/native/BottomSheet.js @@ -2,10 +2,10 @@ import React, { Component, type Node } from 'react'; import { TouchableWithoutFeedback, View } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../../color-scheme'; import { Modal } from '../../../react'; +import { connect } from '../../../redux'; import { StyleType } from '../../../styles'; import { bottomSheetStyles as styles } from './styles'; @@ -107,5 +107,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(BottomSheet); diff --git a/react/features/base/dialog/components/native/ConfirmDialog.js b/react/features/base/dialog/components/native/ConfirmDialog.js index 953244579..9fed7bb39 100644 --- a/react/features/base/dialog/components/native/ConfirmDialog.js +++ b/react/features/base/dialog/components/native/ConfirmDialog.js @@ -2,9 +2,9 @@ import React from 'react'; import { Text, TouchableOpacity } from 'react-native'; -import { connect } from 'react-redux'; import { translate } from '../../../i18n'; +import { connect } from '../../../redux'; import { StyleType } from '../../../styles'; import { _abstractMapStateToProps } from '../../functions'; diff --git a/react/features/base/dialog/components/native/CustomDialog.js b/react/features/base/dialog/components/native/CustomDialog.js index 65b716456..25a4660bf 100644 --- a/react/features/base/dialog/components/native/CustomDialog.js +++ b/react/features/base/dialog/components/native/CustomDialog.js @@ -1,6 +1,6 @@ // @flow -import { connect } from 'react-redux'; +import { connect } from '../../../redux'; import { _abstractMapStateToProps } from '../../functions'; @@ -21,5 +21,4 @@ class CustomDialog extends BaseDialog { } } -// $FlowExpectedError export default connect(_abstractMapStateToProps)(CustomDialog); diff --git a/react/features/base/dialog/components/native/CustomSubmitDialog.js b/react/features/base/dialog/components/native/CustomSubmitDialog.js index ca163dffd..b870d3f5f 100644 --- a/react/features/base/dialog/components/native/CustomSubmitDialog.js +++ b/react/features/base/dialog/components/native/CustomSubmitDialog.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../i18n'; +import { connect } from '../../../redux'; import { _abstractMapStateToProps } from '../../functions'; diff --git a/react/features/base/dialog/components/native/DialogContainer.js b/react/features/base/dialog/components/native/DialogContainer.js index 8862940bf..b21b7d1cc 100644 --- a/react/features/base/dialog/components/native/DialogContainer.js +++ b/react/features/base/dialog/components/native/DialogContainer.js @@ -1,4 +1,4 @@ -import { connect } from 'react-redux'; +import { connect } from '../../../redux'; import AbstractDialogContainer, { abstractMapStateToProps diff --git a/react/features/base/dialog/components/native/InputDialog.js b/react/features/base/dialog/components/native/InputDialog.js index 543e55054..63568569a 100644 --- a/react/features/base/dialog/components/native/InputDialog.js +++ b/react/features/base/dialog/components/native/InputDialog.js @@ -2,9 +2,9 @@ import React from 'react'; import { View, Text, TextInput, TouchableOpacity } from 'react-native'; -import { connect } from 'react-redux'; import { translate } from '../../../i18n'; +import { connect } from '../../../redux'; import { StyleType } from '../../../styles'; import { _abstractMapStateToProps } from '../../functions'; diff --git a/react/features/base/dialog/components/web/Dialog.js b/react/features/base/dialog/components/web/Dialog.js index f9efbf23d..619343721 100644 --- a/react/features/base/dialog/components/web/Dialog.js +++ b/react/features/base/dialog/components/web/Dialog.js @@ -1,7 +1,8 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../../redux'; import AbstractDialog from '../AbstractDialog'; import type { Props as AbstractDialogProps, State } from '../AbstractDialog'; @@ -84,5 +85,4 @@ class Dialog extends AbstractDialog { _onSubmit: (?string) => void; } -// $FlowExpectedError export default connect()(Dialog); diff --git a/react/features/base/dialog/components/web/DialogContainer.js b/react/features/base/dialog/components/web/DialogContainer.js index af1c0c6af..6fe7c074a 100644 --- a/react/features/base/dialog/components/web/DialogContainer.js +++ b/react/features/base/dialog/components/web/DialogContainer.js @@ -1,6 +1,7 @@ import { ModalTransition } from '@atlaskit/modal-dialog'; import React from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../../redux'; import AbstractDialogContainer, { abstractMapStateToProps diff --git a/react/features/base/i18n/dateUtil.js b/react/features/base/i18n/dateUtil.js index 8fa0ced91..154ff066d 100644 --- a/react/features/base/i18n/dateUtil.js +++ b/react/features/base/i18n/dateUtil.js @@ -63,13 +63,10 @@ export function getLocalizedDurationFormatter(duration: number) { // showing the hour and we want to include the hour if the conference is // more than an hour long - // $FlowFixMe if (moment.duration(duration).format('h') !== '0') { - // $FlowFixMe return moment.duration(duration).format('h:mm:ss'); } - // $FlowFixMe return moment.duration(duration).format('mm:ss', { trim: false }); } @@ -97,8 +94,6 @@ function _getSupportedLocale() { // FIXME The flow-type definition of moment is v2.3 while our // package.json states v2.19 so maybe locales on moment was // introduced in between? - // - // $FlowFixMe = moment.locales().find(lang => currentLocaleRegexp.exec(lang)); } } diff --git a/react/features/base/media/components/AbstractAudio.js b/react/features/base/media/components/AbstractAudio.js index 93319db07..a6287aa78 100644 --- a/react/features/base/media/components/AbstractAudio.js +++ b/react/features/base/media/components/AbstractAudio.js @@ -7,7 +7,7 @@ import { Component } from 'react'; * playback. */ export type AudioElement = { - currentTime?: number, + currentTime: number, pause: () => void, play: () => void, setSinkId?: string => void, diff --git a/react/features/base/media/components/native/VideoTrack.js b/react/features/base/media/components/native/VideoTrack.js index 3d2c76cbd..9c74fe200 100644 --- a/react/features/base/media/components/native/VideoTrack.js +++ b/react/features/base/media/components/native/VideoTrack.js @@ -2,7 +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'; @@ -29,5 +30,4 @@ class VideoTrack extends AbstractVideoTrack { } } -// $FlowExpectedError export default connect()(VideoTrack); diff --git a/react/features/base/media/components/native/VideoTransform.js b/react/features/base/media/components/native/VideoTransform.js index ae21d81c7..b2efd4303 100644 --- a/react/features/base/media/components/native/VideoTransform.js +++ b/react/features/base/media/components/native/VideoTransform.js @@ -2,9 +2,10 @@ import React, { Component } from 'react'; import { PanResponder, PixelRatio, View } from 'react-native'; -import { connect } from 'react-redux'; import { type Dispatch } from 'redux'; +import { connect } from '../../../redux'; + import type { PanResponderInstance } from 'PanResponder'; import { storeVideoTransform } from '../../actions'; @@ -727,5 +728,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps, _mapDispatchToProps)(VideoTransform); diff --git a/react/features/base/media/components/web/VideoTrack.js b/react/features/base/media/components/web/VideoTrack.js index 57de153b2..4090ec30e 100644 --- a/react/features/base/media/components/web/VideoTrack.js +++ b/react/features/base/media/components/web/VideoTrack.js @@ -1,7 +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'; @@ -63,5 +64,4 @@ class VideoTrack extends AbstractVideoTrack { _onVideoPlaying: () => void; } -// $FlowExpectedError export default connect()(VideoTrack); diff --git a/react/features/base/participants/components/Avatar.native.js b/react/features/base/participants/components/Avatar.native.js index d5c917fb1..7ead8d503 100644 --- a/react/features/base/participants/components/Avatar.native.js +++ b/react/features/base/participants/components/Avatar.native.js @@ -2,7 +2,10 @@ import React, { Component, Fragment, PureComponent } from 'react'; import { Dimensions, Image, Platform, View } from 'react-native'; -import FastImage from 'react-native-fast-image'; +import FastImage, { + type CacheControls, + type Priorities +} from 'react-native-fast-image'; import { ColorPalette } from '../../styles'; @@ -63,7 +66,12 @@ type State = { /** * Source for the non-local avatar. */ - source: { uri: ?string } + source: { + uri?: string, + headers?: Object, + priority?: Priorities, + cache?: CacheControls, + } }; /** @@ -261,7 +269,7 @@ class AvatarContent extends Component { } } - return (// $FlowFixMe + return ( { size }; - return (// $FlowFixMe + return ( { } } -// $FlowExpectedError export default connect()(PagedList); diff --git a/react/features/base/react/components/web/Watermarks.js b/react/features/base/react/components/web/Watermarks.js index 7e39a157a..32374a23e 100644 --- a/react/features/base/react/components/web/Watermarks.js +++ b/react/features/base/react/components/web/Watermarks.js @@ -1,9 +1,9 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../i18n'; +import { connect } from '../../../redux'; declare var interfaceConfig: Object; @@ -242,5 +242,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(translate(Watermarks)); diff --git a/react/features/base/redux/functions.js b/react/features/base/redux/functions.js index 42d8376df..ad9beccb8 100644 --- a/react/features/base/redux/functions.js +++ b/react/features/base/redux/functions.js @@ -1,6 +1,7 @@ // @flow import _ from 'lodash'; +import { connect as reduxConnect } from 'react-redux'; /** * Sets specific properties of a specific state to specific values and prevents @@ -25,6 +26,19 @@ export function assign(target: Object, source: Object) { 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 {Function?} mapStateToProps - Redux mapStateToProps function. + * @param {Function?} mapDispatchToProps - Redux mapDispatchToProps function. + * @returns {Connector} + */ +export function connect( + mapStateToProps?: Function, mapDispatchToProps?: Function) { + 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/responsive-ui/components/AspectRatioAware.js b/react/features/base/responsive-ui/components/AspectRatioAware.js index eb6d9a3cd..7f59acc37 100644 --- a/react/features/base/responsive-ui/components/AspectRatioAware.js +++ b/react/features/base/responsive-ui/components/AspectRatioAware.js @@ -1,7 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../redux'; import { ASPECT_RATIO_NARROW, ASPECT_RATIO_WIDE } from '../constants'; @@ -51,7 +52,6 @@ export function makeAspectRatioAware( } } - // $FlowFixMe return connect(_mapStateToProps)(AspectRatioAware); } diff --git a/react/features/base/responsive-ui/components/AspectRatioDetector.js b/react/features/base/responsive-ui/components/AspectRatioDetector.js index 611f216ab..cb76cefb1 100644 --- a/react/features/base/responsive-ui/components/AspectRatioDetector.js +++ b/react/features/base/responsive-ui/components/AspectRatioDetector.js @@ -1,9 +1,10 @@ // @flow import React, { Component, type Node } from 'react'; -import { connect } from 'react-redux'; import { type Dispatch } from 'redux'; +import { connect } from '../../redux'; + import { setAspectRatio } from '../actions'; import DimensionsDetector from './DimensionsDetector'; @@ -69,5 +70,4 @@ function _mapDispatchToProps(dispatch: Dispatch) { }; } -// $FlowExpectedError export default connect(undefined, _mapDispatchToProps)(AspectRatioDetector); diff --git a/react/features/base/responsive-ui/components/ReducedUIDetector.js b/react/features/base/responsive-ui/components/ReducedUIDetector.js index 2af6a329c..791ed30c1 100644 --- a/react/features/base/responsive-ui/components/ReducedUIDetector.js +++ b/react/features/base/responsive-ui/components/ReducedUIDetector.js @@ -1,9 +1,10 @@ // @flow import React, { Component, type Node } from 'react'; -import { connect } from 'react-redux'; import { type Dispatch } from 'redux'; +import { connect } from '../../redux'; + import { setReducedUI } from '../actions'; import DimensionsDetector from './DimensionsDetector'; @@ -70,5 +71,4 @@ function _mapDispatchToProps(dispatch: Dispatch) { }; } -// $FlowExpectedError export default connect(undefined, _mapDispatchToProps)(ReducedUIDetector); diff --git a/react/features/base/sounds/components/SoundCollection.js b/react/features/base/sounds/components/SoundCollection.js index cdbf773c0..27bfd796e 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'; @@ -153,5 +153,4 @@ export function _mapDispatchToProps(dispatch: Function) { }; } -// $FlowExpectedError export default connect(_mapStateToProps, _mapDispatchToProps)(SoundCollection); diff --git a/react/features/base/testing/components/TestConnectionInfo.js b/react/features/base/testing/components/TestConnectionInfo.js index a54fa8d20..66e1ee9f8 100644 --- a/react/features/base/testing/components/TestConnectionInfo.js +++ b/react/features/base/testing/components/TestConnectionInfo.js @@ -1,9 +1,9 @@ // @flow import React, { Component, Fragment } from 'react'; -import { connect } from 'react-redux'; import { getLocalParticipant } from '../../participants'; +import { connect } from '../../redux'; // FIXME this imports feature to 'base' import { statsEmitter } from '../../../connection-indicator'; @@ -215,5 +215,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(TestConnectionInfo); diff --git a/react/features/base/testing/components/TestHint.android.js b/react/features/base/testing/components/TestHint.android.js index 534670a05..dd3af79b3 100644 --- a/react/features/base/testing/components/TestHint.android.js +++ b/react/features/base/testing/components/TestHint.android.js @@ -1,9 +1,10 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Text } from 'react-native'; +import { connect } from '../../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 d49765b93..029258316 100644 --- a/react/features/base/testing/components/TestHint.ios.js +++ b/react/features/base/testing/components/TestHint.ios.js @@ -1,9 +1,10 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Text } from 'react-native'; +import { connect } from '../../redux'; + import type { TestHintProps } from './AbstractTestHint'; import { _mapStateToProps } from './AbstractTestHint'; @@ -34,5 +35,4 @@ class TestHint extends Component { } } -// $FlowExpectedError export default connect(_mapStateToProps)(TestHint); diff --git a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js index 6a77eb492..774b5d49a 100644 --- a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js +++ b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js @@ -2,7 +2,6 @@ import Tooltip from '@atlaskit/tooltip'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { @@ -10,6 +9,7 @@ import { sendAnalytics } from '../../analytics'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; 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 afd267dbb..9c9632334 100644 --- a/react/features/calendar-sync/components/CalendarList.native.js +++ b/react/features/calendar-sync/components/CalendarList.native.js @@ -2,11 +2,11 @@ import React from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; -import { connect } from 'react-redux'; import { openSettings } from '../../mobile/permissions'; import { translate } from '../../base/i18n'; import { AbstractPage } from '../../base/react'; +import { connect } from '../../base/redux'; import { refreshCalendar } from '../actions'; import { isCalendarEnabled } from '../functions'; diff --git a/react/features/calendar-sync/components/CalendarList.web.js b/react/features/calendar-sync/components/CalendarList.web.js index 2b73533d5..d57c8a399 100644 --- a/react/features/calendar-sync/components/CalendarList.web.js +++ b/react/features/calendar-sync/components/CalendarList.web.js @@ -2,10 +2,10 @@ import Spinner from '@atlaskit/spinner'; import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { AbstractPage } from '../../base/react'; +import { connect } from '../../base/redux'; import { openSettingsDialog, SETTINGS_TABS } from '../../settings'; import { createCalendarClickedEvent, diff --git a/react/features/calendar-sync/components/CalendarListContent.native.js b/react/features/calendar-sync/components/CalendarListContent.native.js index 44ede1f60..4039e9546 100644 --- a/react/features/calendar-sync/components/CalendarListContent.native.js +++ b/react/features/calendar-sync/components/CalendarListContent.native.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { appNavigate } from '../../app'; import { @@ -11,6 +10,7 @@ import { } from '../../analytics'; import { getLocalizedDateFormatter, translate } from '../../base/i18n'; import { NavigateSectionList } from '../../base/react'; +import { connect } from '../../base/redux'; import { refreshCalendar, openUpdateCalendarEventDialog } from '../actions'; import { isCalendarEnabled } from '../functions'; diff --git a/react/features/calendar-sync/components/CalendarListContent.web.js b/react/features/calendar-sync/components/CalendarListContent.web.js index 2aca10fba..65bb77801 100644 --- a/react/features/calendar-sync/components/CalendarListContent.web.js +++ b/react/features/calendar-sync/components/CalendarListContent.web.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { appNavigate } from '../../app'; import { @@ -10,6 +9,7 @@ import { sendAnalytics } from '../../analytics'; import { MeetingsList } from '../../base/react'; +import { connect } from '../../base/redux'; import { isCalendarEnabled } from '../functions'; @@ -173,7 +173,5 @@ function _mapStateToProps(state: Object) { } export default isCalendarEnabled() - - // $FlowExpectedError ? connect(_mapStateToProps)(CalendarListContent) : undefined; diff --git a/react/features/calendar-sync/components/ConferenceNotification.native.js b/react/features/calendar-sync/components/ConferenceNotification.native.js index 677d4e5a8..071180061 100644 --- a/react/features/calendar-sync/components/ConferenceNotification.native.js +++ b/react/features/calendar-sync/components/ConferenceNotification.native.js @@ -2,12 +2,12 @@ import React, { Component } from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; -import { connect } from 'react-redux'; import { appNavigate } from '../../app'; import { getURLWithoutParamsNormalized } from '../../base/connection'; import { Icon } from '../../base/font-icons'; import { getLocalizedDateFormatter, translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui'; import { isCalendarEnabled } from '../functions'; diff --git a/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js b/react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js index a399836d1..84ad2dea3 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'; diff --git a/react/features/calendar-sync/functions.any.js b/react/features/calendar-sync/functions.any.js index b9bce828e..38b97e15b 100644 --- a/react/features/calendar-sync/functions.any.js +++ b/react/features/calendar-sync/functions.any.js @@ -107,15 +107,16 @@ export function _updateCalendarEntries(events: Array) { */ function _checkPattern(str, positivePattern, negativePattern) { const positiveRegExp = new RegExp(positivePattern, 'gi'); - let positiveMatch; + let positiveMatch = positiveRegExp.exec(str); - while ((positiveMatch = positiveRegExp.exec(str)) !== null) { - // $FlowFixMe + while (positiveMatch !== null) { const url = positiveMatch[0]; if (!new RegExp(negativePattern, 'gi').exec(url)) { return url; } + + positiveMatch = positiveRegExp.exec(str); } } diff --git a/react/features/calendar-sync/reducer.js b/react/features/calendar-sync/reducer.js index a7d9ad27b..b2e934d70 100644 --- a/react/features/calendar-sync/reducer.js +++ b/react/features/calendar-sync/reducer.js @@ -63,7 +63,6 @@ isCalendarEnabled() // knownDomains. At this point, it should have already been // translated into the new state format (namely, base/known-domains) // and the app no longer needs it. - // $FlowFixMe if (typeof state.knownDomains !== 'undefined') { return set(state, 'knownDomains', undefined); } diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js index 9b7c66396..420afeb23 100644 --- a/react/features/chat/components/native/Chat.js +++ b/react/features/chat/components/native/Chat.js @@ -3,10 +3,10 @@ import React from 'react'; import { SafeAreaView } from 'react-native'; import { GiftedChat } from 'react-native-gifted-chat'; -import { connect } from 'react-redux'; import { translate } from '../../../base/i18n'; import { BackButton, Header, HeaderLabel, Modal } from '../../../base/react'; +import { connect } from '../../../base/redux'; import AbstractChat, { _mapDispatchToProps, diff --git a/react/features/chat/components/native/ChatButton.js b/react/features/chat/components/native/ChatButton.js index 7e82293ab..52fc70c80 100644 --- a/react/features/chat/components/native/ChatButton.js +++ b/react/features/chat/components/native/ChatButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { getLocalParticipant } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import { AbstractButton, type AbstractButtonProps @@ -126,5 +125,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps, _mapDispatchToProps)(ChatButton); diff --git a/react/features/chat/components/native/ChatMessage.js b/react/features/chat/components/native/ChatMessage.js index e8f3aa617..d8a394677 100644 --- a/react/features/chat/components/native/ChatMessage.js +++ b/react/features/chat/components/native/ChatMessage.js @@ -2,10 +2,10 @@ import React from 'react'; import { Text, View } from 'react-native'; -import { connect } from 'react-redux'; import { getLocalizedDateFormatter, translate } from '../../../base/i18n'; import { Avatar } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import AbstractChatMessage, { _mapStateToProps as _abstractMapStateToProps, diff --git a/react/features/chat/components/web/Chat.js b/react/features/chat/components/web/Chat.js index 509c387bf..6f83386bf 100644 --- a/react/features/chat/components/web/Chat.js +++ b/react/features/chat/components/web/Chat.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import Transition from 'react-transition-group/Transition'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractChat, { _mapDispatchToProps, diff --git a/react/features/chat/components/web/ChatCounter.js b/react/features/chat/components/web/ChatCounter.js index 08598f5f6..a835c92f8 100644 --- a/react/features/chat/components/web/ChatCounter.js +++ b/react/features/chat/components/web/ChatCounter.js @@ -1,7 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../../base/redux'; import { getUnreadCount } from '../../functions'; @@ -57,5 +58,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(ChatCounter); diff --git a/react/features/chat/components/web/ChatInput.js b/react/features/chat/components/web/ChatInput.js index ba4a26ccd..e71dd5304 100644 --- a/react/features/chat/components/web/ChatInput.js +++ b/react/features/chat/components/web/ChatInput.js @@ -1,10 +1,11 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import Emoji from 'react-emoji-render'; import type { Dispatch } from 'redux'; +import { connect } from '../../../base/redux'; + import { sendMessage } from '../../actions'; import SmileysPanel from './SmileysPanel'; @@ -232,5 +233,4 @@ class ChatInput extends Component { } } -// $FlowExpectedError export default connect()(ChatInput); diff --git a/react/features/chat/components/web/DisplayNameForm.js b/react/features/chat/components/web/DisplayNameForm.js index 22e9b2e60..50ca70125 100644 --- a/react/features/chat/components/web/DisplayNameForm.js +++ b/react/features/chat/components/web/DisplayNameForm.js @@ -2,10 +2,10 @@ import { FieldTextStateless } from '@atlaskit/field-text'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { updateSettings } from '../../../base/settings'; /** diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index e28b072a7..698e27246 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -3,12 +3,12 @@ import React from 'react'; import { BackHandler, SafeAreaView, StatusBar, View } from 'react-native'; -import { connect as reactReduxConnect } from 'react-redux'; import { appNavigate } from '../../../app'; import { connect, disconnect } from '../../../base/connection'; import { getParticipantCount } from '../../../base/participants'; import { Container, LoadingIndicator, TintedView } from '../../../base/react'; +import { connect as reactReduxConnect } from '../../../base/redux'; import { isNarrowAspectRatio, makeAspectRatioAware @@ -540,6 +540,5 @@ function _mapStateToProps(state) { }; } -// $FlowFixMe export default reactReduxConnect(_mapStateToProps, _mapDispatchToProps)( makeAspectRatioAware(Conference)); diff --git a/react/features/conference/components/native/DisplayNameLabel.js b/react/features/conference/components/native/DisplayNameLabel.js index 0107ce994..36d3991b2 100644 --- a/react/features/conference/components/native/DisplayNameLabel.js +++ b/react/features/conference/components/native/DisplayNameLabel.js @@ -2,13 +2,13 @@ import React, { Component } from 'react'; import { Text, View } from 'react-native'; -import { connect } from 'react-redux'; import { getLocalParticipant, getParticipantDisplayName, shouldRenderParticipantVideo } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import { shouldDisplayTileView } from '../../../video-layout'; @@ -76,5 +76,4 @@ function _mapStateToProps(state: Object) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(DisplayNameLabel); diff --git a/react/features/conference/components/native/Labels.js b/react/features/conference/components/native/Labels.js index 76fd653a6..8dfa71673 100644 --- a/react/features/conference/components/native/Labels.js +++ b/react/features/conference/components/native/Labels.js @@ -2,9 +2,9 @@ import React from 'react'; import { TouchableOpacity, View } from 'react-native'; -import { connect } from 'react-redux'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; +import { connect } from '../../../base/redux'; import { isNarrowAspectRatio, makeAspectRatioAware @@ -370,5 +370,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(makeAspectRatioAware(Labels)); diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.js index f57932196..ee81bf8e8 100644 --- a/react/features/conference/components/native/NavigationBar.js +++ b/react/features/conference/components/native/NavigationBar.js @@ -4,9 +4,9 @@ import _ from 'lodash'; import React, { Component } from 'react'; import { SafeAreaView, Text, View } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; -import { connect } from 'react-redux'; import { getConferenceName } from '../../../base/conference'; +import { connect } from '../../../base/redux'; import { PictureInPictureButton } from '../../../mobile/picture-in-picture'; import { isToolboxVisible } from '../../../toolbox'; @@ -87,5 +87,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(NavigationBar); diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.js index 970893eeb..36fd1cdba 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 { obtainConfig } from '../../../base/config'; import { connect, disconnect } from '../../../base/connection'; import { translate } from '../../../base/i18n'; +import { connect as reactReduxConnect } from '../../../base/redux'; import { Chat } from '../../../chat'; import { Filmstrip } from '../../../filmstrip'; import { CalleeInfoContainer } from '../../../invite'; @@ -293,5 +293,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default reactReduxConnect(_mapStateToProps)(translate(Conference)); diff --git a/react/features/conference/components/web/Labels.js b/react/features/conference/components/web/Labels.js index ddc77f2cd..7d09c0dd6 100644 --- a/react/features/conference/components/web/Labels.js +++ b/react/features/conference/components/web/Labels.js @@ -1,9 +1,9 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; +import { connect } from '../../../base/redux'; import AbstractLabels, { _abstractMapStateToProps as _mapStateToProps, @@ -105,5 +105,4 @@ class Labels extends AbstractLabels { _renderVideoQualityLabel: () => React$Element<*>; } -// $FlowExpectedError export default connect(_mapStateToProps)(Labels); diff --git a/react/features/conference/components/web/Notice.js b/react/features/conference/components/web/Notice.js index 77620e22a..eafa58656 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/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.js index e01e6b73d..edc618821 100644 --- a/react/features/conference/components/web/Subject.js +++ b/react/features/conference/components/web/Subject.js @@ -1,8 +1,8 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../../base/redux'; import { isToolboxVisible } from '../../../toolbox'; /** @@ -65,5 +65,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(Subject); diff --git a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js index 45800dd48..5f5191b4a 100644 --- a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js +++ b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js @@ -3,7 +3,7 @@ import Button, { ButtonGroup } from '@atlaskit/button'; import { AtlasKitThemeProvider } from '@atlaskit/theme'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import type { Dispatch } from 'redux'; import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics'; diff --git a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js index d20a785e2..ac2a2d44c 100644 --- a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js +++ b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js @@ -1,7 +1,7 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics'; import { translate, translateToHTML } from '../../base/i18n'; diff --git a/react/features/desktop-picker/components/DesktopPicker.js b/react/features/desktop-picker/components/DesktopPicker.js index bd522c41c..3962a2b53 100644 --- a/react/features/desktop-picker/components/DesktopPicker.js +++ b/react/features/desktop-picker/components/DesktopPicker.js @@ -2,7 +2,7 @@ import Tabs from '@atlaskit/tabs'; import React, { PureComponent } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import type { Dispatch } from 'redux'; import { Dialog, hideDialog } from '../../base/dialog'; diff --git a/react/features/display-name/components/DisplayName.web.js b/react/features/display-name/components/DisplayName.web.js index bf2d2bc03..524e041fe 100644 --- a/react/features/display-name/components/DisplayName.web.js +++ b/react/features/display-name/components/DisplayName.web.js @@ -1,7 +1,7 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import type { Dispatch } from 'redux'; import { appendSuffix } from '../functions'; diff --git a/react/features/display-name/components/DisplayNamePrompt.native.js b/react/features/display-name/components/DisplayNamePrompt.native.js index 86a3fc323..e3626f804 100644 --- a/react/features/display-name/components/DisplayNamePrompt.native.js +++ b/react/features/display-name/components/DisplayNamePrompt.native.js @@ -1,7 +1,7 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import { InputDialog } from '../../base/dialog'; @@ -27,5 +27,4 @@ class DisplayNamePrompt extends AbstractDisplayNamePrompt<*> { _onSetDisplayName: string => boolean; } -// $FlowExpectedError export default connect()(DisplayNamePrompt); diff --git a/react/features/display-name/components/DisplayNamePrompt.web.js b/react/features/display-name/components/DisplayNamePrompt.web.js index f10f8d458..a8e2a2656 100644 --- a/react/features/display-name/components/DisplayNamePrompt.web.js +++ b/react/features/display-name/components/DisplayNamePrompt.web.js @@ -1,7 +1,7 @@ /* @flow */ import React from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import { FieldTextStateless as TextField } from '@atlaskit/field-text'; import { Dialog } from '../../base/dialog'; diff --git a/react/features/feedback/components/FeedbackDialog.web.js b/react/features/feedback/components/FeedbackDialog.web.js index 7fff80cbf..9fddffa6d 100644 --- a/react/features/feedback/components/FeedbackDialog.web.js +++ b/react/features/feedback/components/FeedbackDialog.web.js @@ -4,7 +4,7 @@ import { FieldTextAreaStateless } from '@atlaskit/field-text-area'; import StarIcon from '@atlaskit/icon/glyph/star'; import StarFilledIcon from '@atlaskit/icon/glyph/star-filled'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../base/redux'; import type { Dispatch } from 'redux'; import { diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.js index 732a8bc74..756d980b3 100644 --- a/react/features/filmstrip/components/native/Filmstrip.js +++ b/react/features/filmstrip/components/native/Filmstrip.js @@ -2,9 +2,9 @@ import React, { Component } from 'react'; import { ScrollView } from 'react-native'; -import { connect } from 'react-redux'; import { Container, Platform } from '../../../base/react'; +import { connect } from '../../../base/redux'; import { isNarrowAspectRatio, makeAspectRatioAware @@ -219,5 +219,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(makeAspectRatioAware(Filmstrip)); diff --git a/react/features/filmstrip/components/native/LocalThumbnail.js b/react/features/filmstrip/components/native/LocalThumbnail.js index bb2fc34e6..9e4e37494 100644 --- a/react/features/filmstrip/components/native/LocalThumbnail.js +++ b/react/features/filmstrip/components/native/LocalThumbnail.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 styles from '../styles'; import Thumbnail from './Thumbnail'; @@ -60,5 +60,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(LocalThumbnail); diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.js index 848f40570..d8cf2f71b 100644 --- a/react/features/filmstrip/components/native/Thumbnail.js +++ b/react/features/filmstrip/components/native/Thumbnail.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; @@ -14,6 +13,7 @@ import { pinParticipant } from '../../../base/participants'; import { Container } from '../../../base/react'; +import { connect } from '../../../base/redux'; import { StyleType } from '../../../base/styles'; import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks'; @@ -255,5 +255,4 @@ function _mapStateToProps(state, ownProps) { }; } -// $FlowExpectedError export default connect(_mapStateToProps, _mapDispatchToProps)(Thumbnail); diff --git a/react/features/filmstrip/components/native/TileView.js b/react/features/filmstrip/components/native/TileView.js index 936d6b01b..45ee2fb88 100644 --- a/react/features/filmstrip/components/native/TileView.js +++ b/react/features/filmstrip/components/native/TileView.js @@ -6,13 +6,13 @@ import { TouchableWithoutFeedback, View } from 'react-native'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { getNearestReceiverVideoQualityLevel, setMaxReceiverVideoQuality } from '../../../base/conference'; +import { connect } from '../../../base/redux'; import { DimensionsDetector, isNarrowAspectRatio, @@ -335,5 +335,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(makeAspectRatioAware(TileView)); diff --git a/react/features/filmstrip/components/web/Filmstrip.js b/react/features/filmstrip/components/web/Filmstrip.js index 1b47c6cd5..96b9a2190 100644 --- a/react/features/filmstrip/components/web/Filmstrip.js +++ b/react/features/filmstrip/components/web/Filmstrip.js @@ -2,7 +2,6 @@ import _ from 'lodash'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { @@ -10,6 +9,7 @@ import { createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { connect } from '../../../base/redux'; import { dockToolbox } from '../../../toolbox'; import { setFilmstripHovered, setFilmstripVisible } from '../../actions'; @@ -319,5 +319,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(Filmstrip); diff --git a/react/features/filmstrip/components/web/Toolbar.js b/react/features/filmstrip/components/web/Toolbar.js index 6a9aec055..6ad3a9693 100644 --- a/react/features/filmstrip/components/web/Toolbar.js +++ b/react/features/filmstrip/components/web/Toolbar.js @@ -1,8 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; +import { connect } from '../../../base/redux'; import { SettingsButton } from '../../../settings'; import { AudioMuteButton, @@ -90,5 +90,4 @@ function _mapStateToProps(state): Object { // eslint-disable-line no-unused-vars }; } -// $FlowExpectedError export default connect(_mapStateToProps)(Toolbar); diff --git a/react/features/invite/components/InfoDialogButton.web.js b/react/features/invite/components/InfoDialogButton.web.js index 37bb60f44..a6306c7f6 100644 --- a/react/features/invite/components/InfoDialogButton.web.js +++ b/react/features/invite/components/InfoDialogButton.web.js @@ -2,7 +2,6 @@ import InlineDialog from '@atlaskit/inline-dialog'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { createToolbarEvent, sendAnalytics } from '../../analytics'; @@ -11,6 +10,7 @@ import { translate } from '../../base/i18n'; import { JitsiRecordingConstants } from '../../base/lib-jitsi-meet'; import { getParticipantCount } from '../../base/participants'; import { OverflowMenuItem } from '../../base/toolbox'; +import { connect } from '../../base/redux'; import { getActiveSession } from '../../recording'; import { ToolbarButton } from '../../toolbox'; import { updateDialInNumbers } from '../actions'; diff --git a/react/features/invite/components/InviteButton.native.js b/react/features/invite/components/InviteButton.native.js index 6ab4007b3..797383628 100644 --- a/react/features/invite/components/InviteButton.native.js +++ b/react/features/invite/components/InviteButton.native.js @@ -1,9 +1,9 @@ // @flow -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { AbstractButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; import { beginShareRoom } from '../../share-room'; 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 12344836c..520de0e80 100644 --- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js +++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js @@ -11,7 +11,6 @@ import { TouchableOpacity, View } from 'react-native'; -import { connect } from 'react-redux'; import { Icon } from '../../../../base/font-icons'; import { translate } from '../../../../base/i18n'; @@ -24,6 +23,7 @@ import { Modal, type Item } from '../../../../base/react'; +import { connect } from '../../../../base/redux'; import { setAddPeopleDialogVisible } from '../../../actions'; diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js index 9ceecb21c..3e45e802b 100644 --- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js +++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js @@ -3,7 +3,6 @@ import Avatar from '@atlaskit/avatar'; import InlineMessage from '@atlaskit/inline-message'; import React from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { createInviteDialogEvent, sendAnalytics } from '../../../../analytics'; @@ -11,6 +10,7 @@ import { Dialog, hideDialog } from '../../../../base/dialog'; import { translate, translateToHTML } from '../../../../base/i18n'; import { getLocalParticipant } from '../../../../base/participants'; import { MultiSelectAutocomplete } from '../../../../base/react'; +import { connect } from '../../../../base/redux'; import AbstractAddPeopleDialog, { type Props as AbstractProps, diff --git a/react/features/invite/components/callee-info/CalleeInfo.js b/react/features/invite/components/callee-info/CalleeInfo.js index b274b026a..1e75415e2 100644 --- a/react/features/invite/components/callee-info/CalleeInfo.js +++ b/react/features/invite/components/callee-info/CalleeInfo.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { MEDIA_TYPE } from '../../../base/media'; import { @@ -12,6 +11,7 @@ import { getParticipantPresenceStatus } 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'; @@ -158,5 +158,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(CalleeInfo); diff --git a/react/features/invite/components/callee-info/CalleeInfoContainer.js b/react/features/invite/components/callee-info/CalleeInfoContainer.js index ed095262a..bdfc7f7fd 100644 --- a/react/features/invite/components/callee-info/CalleeInfoContainer.js +++ b/react/features/invite/components/callee-info/CalleeInfoContainer.js @@ -1,7 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../../base/redux'; import CalleeInfo from './CalleeInfo'; @@ -61,5 +62,4 @@ function _mapStateToProps(state: Object): Object { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(CalleeInfoContainer); diff --git a/react/features/invite/components/info-dialog/InfoDialog.web.js b/react/features/invite/components/info-dialog/InfoDialog.web.js index 14a95291b..f77099025 100644 --- a/react/features/invite/components/info-dialog/InfoDialog.web.js +++ b/react/features/invite/components/info-dialog/InfoDialog.web.js @@ -1,13 +1,13 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { setPassword } from '../../../base/conference'; import { getInviteURL } from '../../../base/connection'; import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { isLocalParticipantModerator } from '../../../base/participants'; import { _getDefaultPhoneNumber, getDialInfoPageURL } from '../../functions'; diff --git a/react/features/large-video/components/LargeVideo.native.js b/react/features/large-video/components/LargeVideo.native.js index e8fa57032..35fc9673c 100644 --- a/react/features/large-video/components/LargeVideo.native.js +++ b/react/features/large-video/components/LargeVideo.native.js @@ -1,10 +1,10 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../base/color-scheme'; import { ParticipantView } from '../../base/participants'; +import { connect } from '../../base/redux'; import { DimensionsDetector } from '../../base/responsive-ui'; import { StyleType } from '../../base/styles'; @@ -159,5 +159,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(LargeVideo); diff --git a/react/features/local-recording/components/LocalRecordingInfoDialog.js b/react/features/local-recording/components/LocalRecordingInfoDialog.js index 86054d51a..f98f2a601 100644 --- a/react/features/local-recording/components/LocalRecordingInfoDialog.js +++ b/react/features/local-recording/components/LocalRecordingInfoDialog.js @@ -2,7 +2,6 @@ import moment from 'moment'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { Dialog } from '../../base/dialog'; @@ -11,6 +10,7 @@ import { PARTICIPANT_ROLE, getLocalParticipant } from '../../base/participants'; +import { connect } from '../../base/redux'; import { statsUpdate } from '../actions'; import { recordingController } from '../controller'; diff --git a/react/features/local-recording/components/LocalRecordingLabel.web.js b/react/features/local-recording/components/LocalRecordingLabel.web.js index ef7c023f6..9e25acf47 100644 --- a/react/features/local-recording/components/LocalRecordingLabel.web.js +++ b/react/features/local-recording/components/LocalRecordingLabel.web.js @@ -2,10 +2,10 @@ import Tooltip from '@atlaskit/tooltip'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n/index'; import { CircularLabel } from '../../base/label/index'; +import { connect } from '../../base/redux'; /** diff --git a/react/features/mobile/audio-mode/components/AudioRouteButton.js b/react/features/mobile/audio-mode/components/AudioRouteButton.js index 0d1c75f90..6a5f8091d 100644 --- a/react/features/mobile/audio-mode/components/AudioRouteButton.js +++ b/react/features/mobile/audio-mode/components/AudioRouteButton.js @@ -7,10 +7,10 @@ import { requireNativeComponent, View } from 'react-native'; -import { connect } from 'react-redux'; import { openDialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js b/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js index 0677aca52..7a2e7d7dd 100644 --- a/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js +++ b/react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js @@ -3,11 +3,11 @@ import _ from 'lodash'; import React, { Component } from 'react'; import { NativeModules, Text, TouchableHighlight, View } from 'react-native'; -import { connect } from 'react-redux'; import { hideDialog, BottomSheet } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; import { Icon } from '../../../base/font-icons'; +import { connect } from '../../../base/redux'; import { ColorPalette } from '../../../base/styles'; import styles from './styles'; diff --git a/react/features/mobile/incoming-call/components/AnswerButton.js b/react/features/mobile/incoming-call/components/AnswerButton.js index af89afb2c..0127362c6 100644 --- a/react/features/mobile/incoming-call/components/AnswerButton.js +++ b/react/features/mobile/incoming-call/components/AnswerButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/mobile/incoming-call/components/DeclineButton.js b/react/features/mobile/incoming-call/components/DeclineButton.js index 55bc7c49d..cb036cacd 100644 --- a/react/features/mobile/incoming-call/components/DeclineButton.js +++ b/react/features/mobile/incoming-call/components/DeclineButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/mobile/incoming-call/components/IncomingCallPage.js b/react/features/mobile/incoming-call/components/IncomingCallPage.js index 6e83a74a7..66e1ee0c6 100644 --- a/react/features/mobile/incoming-call/components/IncomingCallPage.js +++ b/react/features/mobile/incoming-call/components/IncomingCallPage.js @@ -3,10 +3,10 @@ import React, { Component } from 'react'; import { Image, Text, View } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; -import { connect } from 'react-redux'; import { translate } from '../../../base/i18n'; import { Avatar } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import AnswerButton from './AnswerButton'; import DeclineButton from './DeclineButton'; diff --git a/react/features/mobile/network-activity/components/NetworkActivityIndicator.js b/react/features/mobile/network-activity/components/NetworkActivityIndicator.js index c5cba2bdf..2b2ae4574 100644 --- a/react/features/mobile/network-activity/components/NetworkActivityIndicator.js +++ b/react/features/mobile/network-activity/components/NetworkActivityIndicator.js @@ -1,9 +1,9 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { LoadingIndicator } from '../../../base/react'; +import { connect } from '../../../base/redux'; /** * The type of the React {@code Component} props of @@ -52,5 +52,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(NetworkActivityIndicator); diff --git a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js index de076701c..453591786 100644 --- a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js +++ b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js @@ -1,9 +1,8 @@ // @flow -import { connect } from 'react-redux'; - import { getAppProp } from '../../../base/app'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/notifications/components/NotificationsContainer.native.js b/react/features/notifications/components/NotificationsContainer.native.js index 2975ec27a..1280fb78a 100644 --- a/react/features/notifications/components/NotificationsContainer.native.js +++ b/react/features/notifications/components/NotificationsContainer.native.js @@ -2,7 +2,8 @@ import React from 'react'; import { View } from 'react-native'; -import { connect } from 'react-redux'; + +import { connect } from '../../base/redux'; import AbstractNotificationsContainer, { _abstractMapStateToProps, @@ -63,5 +64,4 @@ class NotificationsContainer _onDismissed: number => void; } -// $FlowExpectedError export default connect(_abstractMapStateToProps)(NotificationsContainer); diff --git a/react/features/notifications/components/NotificationsContainer.web.js b/react/features/notifications/components/NotificationsContainer.web.js index 24f412071..120772680 100644 --- a/react/features/notifications/components/NotificationsContainer.web.js +++ b/react/features/notifications/components/NotificationsContainer.web.js @@ -2,7 +2,8 @@ import { FlagGroup } from '@atlaskit/flag'; import React from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../base/redux'; import AbstractNotificationsContainer, { _abstractMapStateToProps as _mapStateToProps, @@ -63,5 +64,4 @@ class NotificationsContainer extends AbstractNotificationsContainer { } } -// $FlowExpectedError export default connect(_mapStateToProps)(NotificationsContainer); diff --git a/react/features/overlay/components/FilmstripOnlyOverlayFrame.js b/react/features/overlay/components/FilmstripOnlyOverlayFrame.js index b1bf5d33d..fe1a9635b 100644 --- a/react/features/overlay/components/FilmstripOnlyOverlayFrame.js +++ b/react/features/overlay/components/FilmstripOnlyOverlayFrame.js @@ -1,13 +1,13 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Avatar, getAvatarURL, getLocalParticipant } from '../../base/participants'; +import { connect } from '../../base/redux'; import OverlayFrame from './OverlayFrame'; @@ -112,5 +112,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(FilmstripOnlyOverlayFrame); diff --git a/react/features/overlay/components/OverlayContainer.js b/react/features/overlay/components/OverlayContainer.js index 151245352..f519a233e 100644 --- a/react/features/overlay/components/OverlayContainer.js +++ b/react/features/overlay/components/OverlayContainer.js @@ -1,7 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../base/redux'; import { getOverlayToRender } from '../functions'; @@ -58,5 +59,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(OverlayContainer); diff --git a/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js b/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js index 9b00d0d24..344156ef9 100644 --- a/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.js +++ b/react/features/overlay/components/PageReloadFilmstripOnlyOverlay.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 AbstractPageReloadOverlay, { abstractMapStateToProps } from './AbstractPageReloadOverlay'; diff --git a/react/features/overlay/components/PageReloadOverlay.native.js b/react/features/overlay/components/PageReloadOverlay.native.js index b3aa66778..e040bcae3 100644 --- a/react/features/overlay/components/PageReloadOverlay.native.js +++ b/react/features/overlay/components/PageReloadOverlay.native.js @@ -2,12 +2,12 @@ import React from 'react'; import { Text } from 'react-native'; -import { connect } from 'react-redux'; import { appNavigate, reloadNow } from '../../app'; import { ColorSchemeRegistry } from '../../base/color-scheme'; import { ConfirmDialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { StyleType } from '../../base/styles'; import AbstractPageReloadOverlay, { diff --git a/react/features/overlay/components/PageReloadOverlay.web.js b/react/features/overlay/components/PageReloadOverlay.web.js index b2a673d3a..817d1caaa 100644 --- a/react/features/overlay/components/PageReloadOverlay.web.js +++ b/react/features/overlay/components/PageReloadOverlay.web.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 AbstractPageReloadOverlay, { abstractMapStateToProps, diff --git a/react/features/overlay/components/ReloadButton.js b/react/features/overlay/components/ReloadButton.js index 7fe1998c5..c10bb3098 100644 --- a/react/features/overlay/components/ReloadButton.js +++ b/react/features/overlay/components/ReloadButton.js @@ -1,10 +1,10 @@ /* @flow */ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { reloadNow } from '../../app'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; /** * The type of the React {@code Component} props of {@link ReloadButton}. diff --git a/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js b/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js index dcd23394f..e2032ee8d 100644 --- a/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js +++ b/react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js @@ -1,7 +1,7 @@ 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'; diff --git a/react/features/overlay/components/UserMediaPermissionsOverlay.js b/react/features/overlay/components/UserMediaPermissionsOverlay.js index b10171e86..4a87c054e 100644 --- a/react/features/overlay/components/UserMediaPermissionsOverlay.js +++ b/react/features/overlay/components/UserMediaPermissionsOverlay.js @@ -1,9 +1,9 @@ /* global interfaceConfig */ 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'; diff --git a/react/features/presence-status/components/PresenceLabel.js b/react/features/presence-status/components/PresenceLabel.js index 0dc7a8b6e..570d0b0e6 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'; diff --git a/react/features/recent-list/components/RecentList.native.js b/react/features/recent-list/components/RecentList.native.js index 378ffc59d..60ce39f14 100644 --- a/react/features/recent-list/components/RecentList.native.js +++ b/react/features/recent-list/components/RecentList.native.js @@ -1,13 +1,12 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { getDefaultURL } from '../../app'; import { translate } from '../../base/i18n'; -import { NavigateSectionList } from '../../base/react'; -import type { Section } from '../../base/react'; +import { NavigateSectionList, type Section } 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/RecentList.web.js b/react/features/recent-list/components/RecentList.web.js index a5790d1d1..79268b620 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 AbstractRecentList from './AbstractRecentList'; import { isRecentListEnabled, toDisplayableList } from '../functions'; diff --git a/react/features/recording/components/LiveStream/native/GoogleSigninForm.js b/react/features/recording/components/LiveStream/native/GoogleSigninForm.js index d559152df..3d261819b 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 { diff --git a/react/features/recording/components/LiveStream/native/LiveStreamButton.js b/react/features/recording/components/LiveStream/native/LiveStreamButton.js index d43579793..6e5d7c2e5 100644 --- a/react/features/recording/components/LiveStream/native/LiveStreamButton.js +++ b/react/features/recording/components/LiveStream/native/LiveStreamButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import AbstractLiveStreamButton, { _mapStateToProps, diff --git a/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js b/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js index 93ac3f3f9..f753709d4 100644 --- a/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js +++ b/react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js @@ -2,10 +2,10 @@ import React from 'react'; import { View } from 'react-native'; -import { connect } from 'react-redux'; import { CustomSubmitDialog } from '../../../../base/dialog'; import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import { googleApi } from '../../../../google-api'; diff --git a/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js b/react/features/recording/components/LiveStream/native/StopLiveStreamDialog.js index 8d36dcfdb..54a954692 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 diff --git a/react/features/recording/components/LiveStream/native/StreamKeyForm.js b/react/features/recording/components/LiveStream/native/StreamKeyForm.js index 43b858d2a..85a1ef71e 100644 --- a/react/features/recording/components/LiveStream/native/StreamKeyForm.js +++ b/react/features/recording/components/LiveStream/native/StreamKeyForm.js @@ -2,10 +2,10 @@ import React from 'react'; import { Linking, Text, TextInput, 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 AbstractStreamKeyForm, { diff --git a/react/features/recording/components/LiveStream/native/StreamKeyPicker.js b/react/features/recording/components/LiveStream/native/StreamKeyPicker.js index 63e3a3fee..d3eeccf13 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 9345160c0..76e431030 100644 --- a/react/features/recording/components/LiveStream/web/LiveStreamButton.js +++ b/react/features/recording/components/LiveStream/web/LiveStreamButton.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../../base/i18n'; import { Container, Text } from '../../../../base/react'; +import { connect } from '../../../../base/redux'; import AbstractLiveStreamButton, { _mapStateToProps as _abstractMapStateToProps, diff --git a/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js b/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js index b2adc6562..5fcb86eb2 100644 --- a/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js +++ b/react/features/recording/components/LiveStream/web/StartLiveStreamDialog.js @@ -2,10 +2,10 @@ import Spinner from '@atlaskit/spinner'; import React from 'react'; -import { connect } from 'react-redux'; import { Dialog } from '../../../../base/dialog'; import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import { GOOGLE_API_STATES, diff --git a/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js b/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js index c5b34e56e..751e641fd 100644 --- a/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js +++ b/react/features/recording/components/LiveStream/web/StopLiveStreamDialog.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { Dialog } from '../../../../base/dialog'; import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import AbstractStopLiveStreamDialog, { _mapStateToProps diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.js index 52d3863b5..5c1e42091 100644 --- a/react/features/recording/components/Recording/StartRecordingDialogContent.js +++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { createRecordingDialogEvent, @@ -19,6 +18,7 @@ import { Switch, Text } from '../../../base/react'; +import { connect } from '../../../base/redux'; import { ColorPalette, StyleType } from '../../../base/styles'; import { authorizeDropbox, updateDropboxToken } from '../../../dropbox'; @@ -333,7 +333,7 @@ class StartRecordingDialogContent extends Component { return ( + size = 'small' /> ); } diff --git a/react/features/recording/components/Recording/native/RecordButton.js b/react/features/recording/components/Recording/native/RecordButton.js index 5c77a4a37..3fd9e6168 100644 --- a/react/features/recording/components/Recording/native/RecordButton.js +++ b/react/features/recording/components/Recording/native/RecordButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import AbstractRecordButton, { _mapStateToProps, diff --git a/react/features/recording/components/Recording/native/StartRecordingDialog.js b/react/features/recording/components/Recording/native/StartRecordingDialog.js index 7826260ca..54593d142 100644 --- a/react/features/recording/components/Recording/native/StartRecordingDialog.js +++ b/react/features/recording/components/Recording/native/StartRecordingDialog.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../../base/i18n'; import { CustomSubmitDialog } from '../../../../base/dialog'; +import { connect } from '../../../../base/redux'; import AbstractStartRecordingDialog, { mapStateToProps diff --git a/react/features/recording/components/Recording/native/StopRecordingDialog.js b/react/features/recording/components/Recording/native/StopRecordingDialog.js index eaa3b9e1f..ccd7bfb7c 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, diff --git a/react/features/recording/components/Recording/web/RecordButton.js b/react/features/recording/components/Recording/web/RecordButton.js index d3f919bdf..244dcdc93 100644 --- a/react/features/recording/components/Recording/web/RecordButton.js +++ b/react/features/recording/components/Recording/web/RecordButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../../base/i18n'; +import { connect } from '../../../../base/redux'; import AbstractRecordButton, { _mapStateToProps as _abstractMapStateToProps, diff --git a/react/features/recording/components/Recording/web/StartRecordingDialog.js b/react/features/recording/components/Recording/web/StartRecordingDialog.js index d8b9c5d71..8f63fa8e9 100644 --- a/react/features/recording/components/Recording/web/StartRecordingDialog.js +++ b/react/features/recording/components/Recording/web/StartRecordingDialog.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../../base/i18n'; import { Dialog } from '../../../../base/dialog'; +import { connect } from '../../../../base/redux'; import AbstractStartRecordingDialog, { mapStateToProps diff --git a/react/features/recording/components/Recording/web/StopRecordingDialog.js b/react/features/recording/components/Recording/web/StopRecordingDialog.js index cc7760926..6957f303e 100644 --- a/react/features/recording/components/Recording/web/StopRecordingDialog.js +++ b/react/features/recording/components/Recording/web/StopRecordingDialog.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../../base/i18n'; import { Dialog } from '../../../../base/dialog'; +import { connect } from '../../../../base/redux'; import AbstractStopRecordingDialog, { type Props, diff --git a/react/features/recording/components/native/RecordingExpandedLabel.js b/react/features/recording/components/native/RecordingExpandedLabel.js index 968d76793..b14849c24 100644 --- a/react/features/recording/components/native/RecordingExpandedLabel.js +++ b/react/features/recording/components/native/RecordingExpandedLabel.js @@ -1,13 +1,12 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; import { ExpandedLabel, type Props as AbstractProps } from '../../../base/label'; +import { connect } from '../../../base/redux'; import { getSessionStatusToShow } from '../../functions'; diff --git a/react/features/recording/components/native/RecordingLabel.js b/react/features/recording/components/native/RecordingLabel.js index 13063dc7d..89bebd3f0 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 { CircularLabel } from '../../../base/label'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; +import { connect } from '../../../base/redux'; import AbstractRecordingLabel, { _mapStateToProps diff --git a/react/features/recording/components/web/RecordingLabel.js b/react/features/recording/components/web/RecordingLabel.js index 1c66fcf13..9378d87c8 100644 --- a/react/features/recording/components/web/RecordingLabel.js +++ b/react/features/recording/components/web/RecordingLabel.js @@ -1,11 +1,11 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { CircularLabel } from '../../../base/label'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractRecordingLabel, { _mapStateToProps diff --git a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js b/react/features/remote-control/components/RemoteControlAuthorizationDialog.js index d6ca5f01f..ef36f81ba 100644 --- a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js +++ b/react/features/remote-control/components/RemoteControlAuthorizationDialog.js @@ -1,11 +1,11 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Dialog, hideDialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; import { getParticipantById } from '../../base/participants'; +import { connect } from '../../base/redux'; declare var APP: Object; diff --git a/react/features/remote-video-menu/components/native/KickButton.js b/react/features/remote-video-menu/components/native/KickButton.js index 5f786b202..2b671c92f 100644 --- a/react/features/remote-video-menu/components/native/KickButton.js +++ b/react/features/remote-video-menu/components/native/KickButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractKickButton from '../AbstractKickButton'; diff --git a/react/features/remote-video-menu/components/native/KickRemoteParticipantDialog.js b/react/features/remote-video-menu/components/native/KickRemoteParticipantDialog.js index e6fda5938..a3de7fd14 100644 --- a/react/features/remote-video-menu/components/native/KickRemoteParticipantDialog.js +++ b/react/features/remote-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/remote-video-menu/components/native/MuteButton.js b/react/features/remote-video-menu/components/native/MuteButton.js index 6fcec06bc..84e0640c4 100644 --- a/react/features/remote-video-menu/components/native/MuteButton.js +++ b/react/features/remote-video-menu/components/native/MuteButton.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractMuteButton, { _mapStateToProps } from '../AbstractMuteButton'; diff --git a/react/features/remote-video-menu/components/native/MuteRemoteParticipantDialog.js b/react/features/remote-video-menu/components/native/MuteRemoteParticipantDialog.js index 51e79842b..297446f19 100644 --- a/react/features/remote-video-menu/components/native/MuteRemoteParticipantDialog.js +++ b/react/features/remote-video-menu/components/native/MuteRemoteParticipantDialog.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 AbstractMuteRemoteParticipantDialog from '../AbstractMuteRemoteParticipantDialog'; diff --git a/react/features/remote-video-menu/components/native/RemoteVideoMenu.js b/react/features/remote-video-menu/components/native/RemoteVideoMenu.js index 3e288eceb..d51b9fde4 100644 --- a/react/features/remote-video-menu/components/native/RemoteVideoMenu.js +++ b/react/features/remote-video-menu/components/native/RemoteVideoMenu.js @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import { Text, View } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { @@ -13,6 +12,7 @@ import { getAvatarURL, getParticipantDisplayName } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import { StyleType } from '../../../base/styles'; import { hideRemoteVideoMenu } from '../../actions'; @@ -135,5 +135,4 @@ function _mapStateToProps(state, ownProps) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(RemoteVideoMenu); diff --git a/react/features/remote-video-menu/components/web/KickButton.js b/react/features/remote-video-menu/components/web/KickButton.js index f7a76e91e..1cc30f172 100644 --- a/react/features/remote-video-menu/components/web/KickButton.js +++ b/react/features/remote-video-menu/components/web/KickButton.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 AbstractKickButton, { type Props diff --git a/react/features/remote-video-menu/components/web/KickRemoteParticipantDialog.js b/react/features/remote-video-menu/components/web/KickRemoteParticipantDialog.js index 2f7bf7f1a..0b4be4fbf 100644 --- a/react/features/remote-video-menu/components/web/KickRemoteParticipantDialog.js +++ b/react/features/remote-video-menu/components/web/KickRemoteParticipantDialog.js @@ -1,10 +1,10 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractKickRemoteParticipantDialog from '../AbstractKickRemoteParticipantDialog'; diff --git a/react/features/remote-video-menu/components/web/MuteButton.js b/react/features/remote-video-menu/components/web/MuteButton.js index c01643bd0..66044326e 100644 --- a/react/features/remote-video-menu/components/web/MuteButton.js +++ b/react/features/remote-video-menu/components/web/MuteButton.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 AbstractMuteButton, { _mapStateToProps, diff --git a/react/features/remote-video-menu/components/web/MuteRemoteParticipantDialog.js b/react/features/remote-video-menu/components/web/MuteRemoteParticipantDialog.js index 0e6a8896b..15b89ecbf 100644 --- a/react/features/remote-video-menu/components/web/MuteRemoteParticipantDialog.js +++ b/react/features/remote-video-menu/components/web/MuteRemoteParticipantDialog.js @@ -1,10 +1,10 @@ /* @flow */ import React from 'react'; -import { connect } from 'react-redux'; import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import AbstractMuteRemoteParticipantDialog from '../AbstractMuteRemoteParticipantDialog'; diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.native.js b/react/features/room-lock/components/PasswordRequiredPrompt.native.js index 3071ed78e..7406f13e7 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'; @@ -100,5 +100,4 @@ class PasswordRequiredPrompt extends Component { } } -// $FlowExpectedError export default connect()(PasswordRequiredPrompt); diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.web.js b/react/features/room-lock/components/PasswordRequiredPrompt.web.js index cf2403b25..01276ed31 100644 --- a/react/features/room-lock/components/PasswordRequiredPrompt.web.js +++ b/react/features/room-lock/components/PasswordRequiredPrompt.web.js @@ -2,12 +2,12 @@ import { FieldTextStateless as TextField } from '@atlaskit/field-text'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { setPassword } from '../../base/conference'; import { Dialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; /** * The type of the React {@code Component} props of diff --git a/react/features/room-lock/components/RoomLockButton.js b/react/features/room-lock/components/RoomLockButton.js index 1c2c2d8ee..75ab5ec3d 100644 --- a/react/features/room-lock/components/RoomLockButton.js +++ b/react/features/room-lock/components/RoomLockButton.js @@ -1,9 +1,9 @@ // @flow -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { isLocalParticipantModerator } from '../../base/participants'; +import { connect } from '../../base/redux'; import { AbstractButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; diff --git a/react/features/room-lock/components/RoomLockPrompt.native.js b/react/features/room-lock/components/RoomLockPrompt.native.js index 7a1077643..503a4e535 100644 --- a/react/features/room-lock/components/RoomLockPrompt.native.js +++ b/react/features/room-lock/components/RoomLockPrompt.native.js @@ -1,10 +1,10 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { InputDialog } from '../../base/dialog'; +import { connect } from '../../base/redux'; import { endRoomLockRequest } from '../actions'; @@ -102,5 +102,4 @@ class RoomLockPrompt extends Component { } } -// $FlowExpectedError export default connect()(RoomLockPrompt); diff --git a/react/features/settings/components/native/SettingsView.js b/react/features/settings/components/native/SettingsView.js index 6ec885242..747b6ee33 100644 --- a/react/features/settings/components/native/SettingsView.js +++ b/react/features/settings/components/native/SettingsView.js @@ -9,11 +9,11 @@ import { TextInput, View } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { translate } from '../../../base/i18n'; import { BackButton, Header, Modal } from '../../../base/react'; +import { connect } from '../../../base/redux'; import { AbstractSettingsView, diff --git a/react/features/settings/components/web/CalendarTab.js b/react/features/settings/components/web/CalendarTab.js index 4ef5e16b0..43f0b6909 100644 --- a/react/features/settings/components/web/CalendarTab.js +++ b/react/features/settings/components/web/CalendarTab.js @@ -3,9 +3,9 @@ import Button from '@atlaskit/button'; import Spinner from '@atlaskit/spinner'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { CALENDAR_TYPE, MicrosoftSignInButton, diff --git a/react/features/settings/components/web/SettingsButton.js b/react/features/settings/components/web/SettingsButton.js index 3740a0e3f..8ed70ceea 100644 --- a/react/features/settings/components/web/SettingsButton.js +++ b/react/features/settings/components/web/SettingsButton.js @@ -1,9 +1,8 @@ // @flow -import { connect } from 'react-redux'; - import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; import { openDeviceSelectionPopup } from '../../../device-selection'; diff --git a/react/features/settings/components/web/SettingsDialog.js b/react/features/settings/components/web/SettingsDialog.js index dc6243534..18a9ac9a6 100644 --- a/react/features/settings/components/web/SettingsDialog.js +++ b/react/features/settings/components/web/SettingsDialog.js @@ -1,10 +1,10 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { getAvailableDevices } from '../../../base/devices'; import { DialogWithTabs, hideDialog } from '../../../base/dialog'; +import { connect } from '../../../base/redux'; import { isCalendarEnabled } from '../../../calendar-sync'; import { DeviceSelection, @@ -198,5 +198,4 @@ function _mapStateToProps(state) { return { _tabs: tabs }; } -// $FlowExpectedError export default connect(_mapStateToProps)(SettingsDialog); diff --git a/react/features/speaker-stats/components/SpeakerStats.js b/react/features/speaker-stats/components/SpeakerStats.js index a966e9b4b..20d2cc0d1 100644 --- a/react/features/speaker-stats/components/SpeakerStats.js +++ b/react/features/speaker-stats/components/SpeakerStats.js @@ -1,11 +1,12 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Dialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; import { getLocalParticipant } from '../../base/participants'; +import { connect } from '../../base/redux'; + import SpeakerStatsItem from './SpeakerStatsItem'; import SpeakerStatsLabels from './SpeakerStatsLabels'; diff --git a/react/features/subtitles/components/Captions.native.js b/react/features/subtitles/components/Captions.native.js index ba157256e..a34b690f6 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 { _abstractMapStateToProps, @@ -65,5 +65,4 @@ class Captions } } -// $FlowExpectedError export default connect(_abstractMapStateToProps)(Captions); diff --git a/react/features/subtitles/components/Captions.web.js b/react/features/subtitles/components/Captions.web.js index 774d0c6bd..6963c194a 100644 --- a/react/features/subtitles/components/Captions.web.js +++ b/react/features/subtitles/components/Captions.web.js @@ -1,7 +1,8 @@ // @flow import React from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../base/redux'; import { _abstractMapStateToProps, @@ -52,5 +53,4 @@ class Captions } } -// $FlowExpectedError export default connect(_abstractMapStateToProps)(Captions); diff --git a/react/features/subtitles/components/ClosedCaptionButton.native.js b/react/features/subtitles/components/ClosedCaptionButton.native.js index 6bb01f192..1da94e479 100644 --- a/react/features/subtitles/components/ClosedCaptionButton.native.js +++ b/react/features/subtitles/components/ClosedCaptionButton.native.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../base/i18n'; +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 6df9f22a2..99cc8d553 100644 --- a/react/features/subtitles/components/ClosedCaptionButton.web.js +++ b/react/features/subtitles/components/ClosedCaptionButton.web.js @@ -1,8 +1,7 @@ // @flow -import { connect } from 'react-redux'; - -import { translate } from '../../base/i18n/index'; +import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { AbstractClosedCaptionButton, diff --git a/react/features/toolbox/components/AudioMuteButton.js b/react/features/toolbox/components/AudioMuteButton.js index 58fa45af9..d67116031 100644 --- a/react/features/toolbox/components/AudioMuteButton.js +++ b/react/features/toolbox/components/AudioMuteButton.js @@ -1,7 +1,5 @@ // @flow -import { connect } from 'react-redux'; - import { ACTION_SHORTCUT_TRIGGERED, AUDIO_MUTE, @@ -11,6 +9,7 @@ import { } from '../../analytics'; import { translate } from '../../base/i18n'; import { MEDIA_TYPE, setAudioMuted } from '../../base/media'; +import { connect } from '../../base/redux'; import { AbstractAudioMuteButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; import { isLocalTrackMuted } from '../../base/tracks'; diff --git a/react/features/toolbox/components/HangupButton.js b/react/features/toolbox/components/HangupButton.js index dfc5f3f52..1070fbd48 100644 --- a/react/features/toolbox/components/HangupButton.js +++ b/react/features/toolbox/components/HangupButton.js @@ -1,11 +1,11 @@ // @flow -import { connect } from 'react-redux'; import { createToolbarEvent, sendAnalytics } from '../../analytics'; import { appNavigate } from '../../app'; import { disconnect } from '../../base/connection'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { AbstractHangupButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; diff --git a/react/features/toolbox/components/VideoMuteButton.js b/react/features/toolbox/components/VideoMuteButton.js index 99856f611..7cf6cab19 100644 --- a/react/features/toolbox/components/VideoMuteButton.js +++ b/react/features/toolbox/components/VideoMuteButton.js @@ -1,7 +1,5 @@ // @flow -import { connect } from 'react-redux'; - import { ACTION_SHORTCUT_TRIGGERED, VIDEO_MUTE, @@ -15,6 +13,7 @@ import { VIDEO_MUTISM_AUTHORITY, setVideoMuted } from '../../base/media'; +import { connect } from '../../base/redux'; import { AbstractVideoMuteButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; import { isLocalTrackMuted } from '../../base/tracks'; diff --git a/react/features/toolbox/components/native/AudioOnlyButton.js b/react/features/toolbox/components/native/AudioOnlyButton.js index dc9d9a1c7..2f59debdd 100644 --- a/react/features/toolbox/components/native/AudioOnlyButton.js +++ b/react/features/toolbox/components/native/AudioOnlyButton.js @@ -1,9 +1,8 @@ // @flow -import { connect } from 'react-redux'; - import { toggleAudioOnly } from '../../../base/conference'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/toolbox/components/native/OverflowMenu.js b/react/features/toolbox/components/native/OverflowMenu.js index cfb811600..08f042d75 100644 --- a/react/features/toolbox/components/native/OverflowMenu.js +++ b/react/features/toolbox/components/native/OverflowMenu.js @@ -2,13 +2,13 @@ import React, { Component } from 'react'; import { Platform } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { BottomSheet, hideDialog } from '../../../base/dialog'; +import { connect } from '../../../base/redux'; import { StyleType } from '../../../base/styles'; import { InviteButton } from '../../../invite'; import { AudioRouteButton } from '../../../mobile/audio-mode'; @@ -128,7 +128,6 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError OverflowMenu_ = connect(_mapStateToProps)(OverflowMenu); export default OverflowMenu_; diff --git a/react/features/toolbox/components/native/OverflowMenuButton.js b/react/features/toolbox/components/native/OverflowMenuButton.js index f1784fad9..a366b4f59 100644 --- a/react/features/toolbox/components/native/OverflowMenuButton.js +++ b/react/features/toolbox/components/native/OverflowMenuButton.js @@ -1,9 +1,8 @@ // @flow -import { connect } from 'react-redux'; - import { openDialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; diff --git a/react/features/toolbox/components/native/ToggleCameraButton.js b/react/features/toolbox/components/native/ToggleCameraButton.js index f3fd3777f..50921f9c8 100644 --- a/react/features/toolbox/components/native/ToggleCameraButton.js +++ b/react/features/toolbox/components/native/ToggleCameraButton.js @@ -1,9 +1,8 @@ // @flow -import { connect } from 'react-redux'; - import { translate } from '../../../base/i18n'; import { MEDIA_TYPE, toggleCameraFacingMode } from '../../../base/media'; +import { connect } from '../../../base/redux'; import { AbstractButton } from '../../../base/toolbox'; import type { AbstractButtonProps } from '../../../base/toolbox'; import { isLocalTrackMuted } from '../../../base/tracks'; diff --git a/react/features/toolbox/components/native/Toolbox.js b/react/features/toolbox/components/native/Toolbox.js index b87ee0183..4c70f17a3 100644 --- a/react/features/toolbox/components/native/Toolbox.js +++ b/react/features/toolbox/components/native/Toolbox.js @@ -2,10 +2,10 @@ import React, { Component } from 'react'; import { View } from 'react-native'; -import { connect } from 'react-redux'; import { Container } from '../../../base/react'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; +import { connect } from '../../../base/redux'; import { StyleType } from '../../../base/styles'; import { ChatButton } from '../../../chat'; @@ -279,5 +279,4 @@ function _mapStateToProps(state: Object): Object { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(Toolbox); diff --git a/react/features/toolbox/components/web/OverflowMenuProfileItem.js b/react/features/toolbox/components/web/OverflowMenuProfileItem.js index 7a12fd6cf..26359edcb 100644 --- a/react/features/toolbox/components/web/OverflowMenuProfileItem.js +++ b/react/features/toolbox/components/web/OverflowMenuProfileItem.js @@ -1,7 +1,8 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; + +import { connect } from '../../../base/redux'; import { Avatar, @@ -121,5 +122,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(OverflowMenuProfileItem); diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index 2930a7466..836df405e 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -1,7 +1,6 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { ACTION_SHORTCUT_TRIGGERED, @@ -16,6 +15,7 @@ import { getParticipants, participantUpdated } from '../../../base/participants'; +import { connect } from '../../../base/redux'; import { OverflowMenuItem } from '../../../base/toolbox'; import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks'; import { ChatCounter, toggleChat } from '../../../chat'; diff --git a/react/features/transcribing/components/TranscribingLabel.native.js b/react/features/transcribing/components/TranscribingLabel.native.js index 27e8d63f9..73cd73735 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 { CircularLabel } from '../../base/label'; +import { connect } from '../../base/redux'; import { _mapStateToProps, type Props } from './AbstractTranscribingLabel'; diff --git a/react/features/transcribing/components/TranscribingLabel.web.js b/react/features/transcribing/components/TranscribingLabel.web.js index e77b987a9..ee2eeebb7 100644 --- a/react/features/transcribing/components/TranscribingLabel.web.js +++ b/react/features/transcribing/components/TranscribingLabel.web.js @@ -2,10 +2,10 @@ import Tooltip from '@atlaskit/tooltip'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { CircularLabel } from '../../base/label'; +import { connect } from '../../base/redux'; import { _mapStateToProps, type Props } from './AbstractTranscribingLabel'; diff --git a/react/features/video-layout/components/TileViewButton.js b/react/features/video-layout/components/TileViewButton.js index 31b44dd09..833afa93f 100644 --- a/react/features/video-layout/components/TileViewButton.js +++ b/react/features/video-layout/components/TileViewButton.js @@ -1,6 +1,5 @@ // @flow -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { @@ -8,6 +7,7 @@ import { sendAnalytics } from '../../analytics'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; import { AbstractButton, type AbstractButtonProps diff --git a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js index e9a157c13..411311176 100644 --- a/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js +++ b/react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js @@ -1,10 +1,10 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { VIDEO_QUALITY_LEVELS } from '../../base/conference'; import { translate } from '../../base/i18n'; +import { connect } from '../../base/redux'; /** * A map of of selectable receive resolutions to corresponding icons. diff --git a/react/features/video-quality/components/VideoQualityLabel.native.js b/react/features/video-quality/components/VideoQualityLabel.native.js index 37fe2401d..6d1189e42 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 { CircularLabel } from '../../base/label'; +import { connect } from '../../base/redux'; import { combineStyles, type StyleType } 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 1afe433ea..9f62a46c8 100644 --- a/react/features/video-quality/components/VideoQualityLabel.web.js +++ b/react/features/video-quality/components/VideoQualityLabel.web.js @@ -2,11 +2,11 @@ import Tooltip from '@atlaskit/tooltip'; import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { CircularLabel } from '../../base/label'; import { MEDIA_TYPE } from '../../base/media'; +import { connect } from '../../base/redux'; import { getTrackByMediaTypeAndParticipant } from '../../base/tracks'; import AbstractVideoQualityLabel, { diff --git a/react/features/video-quality/components/VideoQualitySlider.web.js b/react/features/video-quality/components/VideoQualitySlider.web.js index 8edc1179a..8f78de235 100644 --- a/react/features/video-quality/components/VideoQualitySlider.web.js +++ b/react/features/video-quality/components/VideoQualitySlider.web.js @@ -2,7 +2,6 @@ import InlineMessage from '@atlaskit/inline-message'; import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; import { @@ -16,6 +15,7 @@ import { } from '../../base/conference'; import { translate } from '../../base/i18n'; import JitsiMeetJS from '../../base/lib-jitsi-meet'; +import { connect } from '../../base/redux'; const logger = require('jitsi-meet-logger').getLogger(__filename); diff --git a/react/features/welcome/components/BlankPage.native.js b/react/features/welcome/components/BlankPage.native.js index 93f157fdd..aa9d584bc 100644 --- a/react/features/welcome/components/BlankPage.native.js +++ b/react/features/welcome/components/BlankPage.native.js @@ -1,9 +1,9 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import type { Dispatch } from 'redux'; +import { connect } from '../../base/redux'; import { destroyLocalTracks } from '../../base/tracks'; import { NetworkActivityIndicator } from '../../mobile/network-activity'; @@ -48,5 +48,4 @@ class BlankPage extends Component { } } -// $FlowExpectedError export default connect()(BlankPage); diff --git a/react/features/welcome/components/LocalVideoTrackUnderlay.native.js b/react/features/welcome/components/LocalVideoTrackUnderlay.native.js index b7ff11060..0144331e0 100644 --- a/react/features/welcome/components/LocalVideoTrackUnderlay.native.js +++ b/react/features/welcome/components/LocalVideoTrackUnderlay.native.js @@ -2,10 +2,10 @@ import React, { Component } from 'react'; import { View } from 'react-native'; -import { connect } from 'react-redux'; import { VideoTrack } from '../../base/media'; import { TintedView } from '../../base/react'; +import { connect } from '../../base/redux'; import { getLocalVideoTrack } from '../../base/tracks'; import styles from './styles'; @@ -77,5 +77,4 @@ function _mapStateToProps(state) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(LocalVideoTrackUnderlay); diff --git a/react/features/welcome/components/VideoSwitch.js b/react/features/welcome/components/VideoSwitch.js index 43824a673..722547613 100644 --- a/react/features/welcome/components/VideoSwitch.js +++ b/react/features/welcome/components/VideoSwitch.js @@ -2,11 +2,11 @@ import React, { Component } from 'react'; import { Switch, TouchableWithoutFeedback, View } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../base/color-scheme'; import { translate } from '../../base/i18n'; import { Text } from '../../base/react'; +import { connect } from '../../base/redux'; import { updateSettings } from '../../base/settings'; import styles, { SWITCH_THUMB_COLOR, SWITCH_UNDER_COLOR } from './styles'; diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.js index 0ead0b8a0..c0fe92433 100644 --- a/react/features/welcome/components/WelcomePage.native.js +++ b/react/features/welcome/components/WelcomePage.native.js @@ -8,13 +8,13 @@ import { TouchableOpacity, View } from 'react-native'; -import { connect } from 'react-redux'; import { ColorSchemeRegistry } from '../../base/color-scheme'; import { translate } from '../../base/i18n'; import { Icon } from '../../base/font-icons'; import { MEDIA_TYPE } from '../../base/media'; import { Header, LoadingIndicator, Text } from '../../base/react'; +import { connect } from '../../base/redux'; import { ColorPalette } from '../../base/styles'; import { createDesiredLocalTracks, diff --git a/react/features/welcome/components/WelcomePage.web.js b/react/features/welcome/components/WelcomePage.web.js index 8c94d6ec0..08761c1f8 100644 --- a/react/features/welcome/components/WelcomePage.web.js +++ b/react/features/welcome/components/WelcomePage.web.js @@ -1,10 +1,10 @@ /* global interfaceConfig */ import React from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { Platform, Watermarks } from '../../base/react'; +import { connect } from '../../base/redux'; import { CalendarList } from '../../calendar-sync'; import { RecentList } from '../../recent-list'; import { SettingsButton, SETTINGS_TABS } from '../../settings'; diff --git a/react/features/welcome/components/WelcomePageLists.js b/react/features/welcome/components/WelcomePageLists.js index 2eb7c7065..fd2c8b9e6 100644 --- a/react/features/welcome/components/WelcomePageLists.js +++ b/react/features/welcome/components/WelcomePageLists.js @@ -1,10 +1,10 @@ // @flow import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { PagedList } from '../../base/react'; +import { connect } from '../../base/redux'; import { CalendarList } from '../../calendar-sync'; import { RecentList } from '../../recent-list'; diff --git a/react/features/welcome/components/WelcomePageSideBar.native.js b/react/features/welcome/components/WelcomePageSideBar.native.js index 75ce2676e..a045f6f5f 100644 --- a/react/features/welcome/components/WelcomePageSideBar.native.js +++ b/react/features/welcome/components/WelcomePageSideBar.native.js @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import { SafeAreaView, ScrollView, Text } from 'react-native'; -import { connect } from 'react-redux'; import { Avatar, @@ -14,6 +13,7 @@ import { Header, SideBar } from '../../base/react'; +import { connect } from '../../base/redux'; import { setSettingsViewVisible } from '../../settings'; import { setSideBarVisible } from '../actions'; @@ -169,5 +169,4 @@ function _mapStateToProps(state: Object) { }; } -// $FlowExpectedError export default connect(_mapStateToProps)(WelcomePageSideBar);