Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(react) removed unused native components
Calin Chitu4f49cde73e7f
diff --git a/react/features/base/react/components/native/BackButton.js b/react/features/base/react/components/native/BackButton.jsdeleted file mode 100644index 2af9d88943..0000000000--- a/react/features/base/react/components/native/BackButton.js+++ /dev/null@@ -1,71 +0,0 @@-// @flow--import React, { Component } from 'react';-import { TouchableOpacity } from 'react-native';--import { ColorSchemeRegistry } from '../../../color-scheme';-import { Icon, IconArrowBack } from '../../../icons';-import { connect } from '../../../redux';--/**- * The type of the React {@code Component} props of {@link BackButton}.- */-type Props = {-- /**- * The action to be performed when the button is pressed.- */- onPress: Function,-- /**- * An external style object passed to the component.- */- style?: Object,-- /**- * The color schemed style of the Header component.- */- _headerStyles: Object-};--/**- * A component rendering a back button.- */-class BackButton extends Component<Props> {- /**- * Implements React's {@link Component#render()}, renders the button.- *- * @inheritdoc- * @returns {ReactElement}- */- render() {- return (- <TouchableOpacity- accessibilityLabel = { 'Back' }- onPress = { this.props.onPress }>- <Icon- src = { IconArrowBack }- style = { [- this.props._headerStyles.headerButtonIcon,- this.props.style- ] } />- </TouchableOpacity>- );- }-}--/**- * Maps part of the Redux state to the props of this component.- *- * @param {Object} state - The Redux state.- * @returns {{- * _headerStyles: Object- * }}- */-function _mapStateToProps(state) {- return {- _headerStyles: ColorSchemeRegistry.get(state, 'Header')- };-}--export default connect(_mapStateToProps)(BackButton);diff --git a/react/features/base/react/components/native/Button.js b/react/features/base/react/components/native/Button.jsdeleted file mode 100644index ebcb907385..0000000000--- a/react/features/base/react/components/native/Button.js+++ /dev/null@@ -1,44 +0,0 @@-/* @flow */--import React, { Component } from 'react';-import { Text, TouchableOpacity } from 'react-native';--type Props = {-- /**- * React Elements to display within the component.- */- children: React$Node | Object,-- /**- * Handler called when the user presses the button.- */- onValueChange: Function,-- /**- * The component's external style.- */- style: Object-};--/**- * Renders a button.- */-export default class ButtonImpl extends Component<Props> {- /**- * Implements React's {@link Component#render()}, renders the button.- *- * @inheritdoc- * @returns {ReactElement}- */- render() {- return (- <TouchableOpacity- onPress = { this.props.onValueChange } >- <Text style = { this.props.style }>- { this.props.children }- </Text>- </TouchableOpacity>- );- }-}diff --git a/react/features/base/react/components/native/ForwardButton.js b/react/features/base/react/components/native/ForwardButton.jsdeleted file mode 100644index 15d2683e32..0000000000--- a/react/features/base/react/components/native/ForwardButton.js+++ /dev/null@@ -1,91 +0,0 @@-// @flow--import React, { Component } from 'react';-import { Text, TouchableOpacity } from 'react-native';--import { ColorSchemeRegistry } from '../../../color-scheme';-import { translate } from '../../../i18n';-import { connect } from '../../../redux';--/**- * The type of the React {@code Component} props of {@link ForwardButton}.- */-type Props = {-- /**- * True if the nutton should be disabled.- */- disabled: boolean;-- /**- * The i18n label key of the button.- */- labelKey: string,-- /**- * The action to be performed when the button is pressed.- */- onPress: Function,-- /**- * An external style object passed to the component.- */- style?: Object,-- /**- * The function to be used to translate i18n labels.- */- t: Function,-- /**- * The color schemed style of the Header component.- */- _headerStyles: Object-};--/**- * A component rendering a forward/next/action button.- */-class ForwardButton extends Component<Props> {- /**- * Implements React's {@link Component#render()}, renders the button.- *- * @inheritdoc- * @returns {ReactElement}- */- render() {- const { _headerStyles } = this.props;-- return (- <TouchableOpacity- accessibilityLabel = { 'Forward' }- disabled = { this.props.disabled }- onPress = { this.props.onPress } >- <Text- style = { [- _headerStyles.headerButtonText,- this.props.disabled && _headerStyles.disabledButtonText,- this.props.style- ] }>- { this.props.t(this.props.labelKey) }- </Text>- </TouchableOpacity>- );- }-}--/**- * Maps part of the Redux state to the props of the component.- *- * @param {Object} state - The Redux state.- * @returns {{- * _headerStyles: Object- * }}- */-function _mapStateToProps(state) {- return {- _headerStyles: ColorSchemeRegistry.get(state, 'Header')- };-}--export default translate(connect(_mapStateToProps)(ForwardButton));diff --git a/react/features/base/react/components/native/HeaderLabel.js b/react/features/base/react/components/native/HeaderLabel.jsdeleted file mode 100644index 1530f7f712..0000000000--- a/react/features/base/react/components/native/HeaderLabel.js+++ /dev/null@@ -1,73 +0,0 @@-// @flow--import React, { Component } from 'react';-import { Text, View } from 'react-native';--import { ColorSchemeRegistry } from '../../../color-scheme';-import { translate } from '../../../i18n';-import { connect } from '../../../redux';--/**- * The type of the React {@code Component} props of {@link HeaderLabel}.- */-type Props = {-- /**- * The i18n key of the label to be rendered.- */- labelKey: string,-- /**- * The i18n translate function.- */- t: Function,-- /**- * The color schemed style of the Header component.- */- _headerStyles: Object-};--/**- * A component rendering a standard label in the header.- */-class HeaderLabel extends Component<Props> {- /**- * Implements React's {@link Component#render()}.- *- * @inheritdoc- * @returns {ReactElement}- */- render() {- const { _headerStyles } = this.props;-- return (- <View- pointerEvents = 'box-none'- style = { _headerStyles.headerTextWrapper }>- <Text- style = { [- _headerStyles.headerText- ] }>- { this.props.t(this.props.labelKey) }- </Text>- </View>- );- }-}--/**- * Maps part of the Redux state to the props of this component.- *- * @param {Object} state - The Redux state.- * @returns {{- * _headerStyles: Object- * }}- */-function _mapStateToProps(state) {- return {- _headerStyles: ColorSchemeRegistry.get(state, 'Header')- };-}--export default translate(connect(_mapStateToProps)(HeaderLabel));diff --git a/react/features/base/react/components/native/index.js b/react/features/base/react/components/native/index.jsindex 3437d26b71..69f7cf0b3e 100644--- a/react/features/base/react/components/native/index.js+++ b/react/features/base/react/components/native/index.js@@ -1,12 +1,8 @@// @flowexport { default as AvatarListItem } from './AvatarListItem';-export { default as BackButton } from './BackButton';export { default as BaseIndicator } from './BaseIndicator';-export { default as Button } from './Button';export { default as Container } from './Container';-export { default as ForwardButton } from './ForwardButton';-export { default as HeaderLabel } from './HeaderLabel';export { default as Image } from './Image';export { default as Link } from './Link';export { default as Linkify } from './Linkify';