diff --git a/src/components/DeeplinkWrapper/index.website.js b/src/components/DeeplinkWrapper/index.website.js index 5179ffa99da0..fbdd4de5d239 100644 --- a/src/components/DeeplinkWrapper/index.website.js +++ b/src/components/DeeplinkWrapper/index.website.js @@ -1,21 +1,12 @@ import _ from 'underscore'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; import React, {PureComponent} from 'react'; import {withOnyx} from 'react-native-onyx'; import deeplinkRoutes from './deeplinkRoutes'; import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import TextLink from '../TextLink'; -import * as Illustrations from '../Icon/Illustrations'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Text from '../Text'; import styles from '../../styles/styles'; -import compose from '../../libs/compose'; import CONST from '../../CONST'; import CONFIG from '../../CONFIG'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import colors from '../../styles/colors'; import * as Browser from '../../libs/Browser'; import ONYXKEYS from '../../ONYXKEYS'; @@ -23,7 +14,11 @@ const propTypes = { /** Children to render. */ children: PropTypes.node.isRequired, - ...withLocalizePropTypes, + /** Beta features list */ + betas: PropTypes.arrayOf(PropTypes.string), +}; +const defaultProps = { + betas: [], }; class DeeplinkWrapper extends PureComponent { @@ -65,10 +60,7 @@ class DeeplinkWrapper extends PureComponent { }); if (matchedRoute) { - this.setState({deeplinkMatch: true}); this.openRouteInDesktopApp(); - } else { - this.setState({deeplinkMatch: false}); } } @@ -115,56 +107,12 @@ class DeeplinkWrapper extends PureComponent { return ; } - if ( - this.state.deeplinkMatch - && this.state.appInstallationCheckStatus === CONST.DESKTOP_DEEPLINK_APP_STATE.INSTALLED - ) { - return ( - - - - - - - {this.props.translate('deeplinkWrapper.launching')} - - - - {this.props.translate('deeplinkWrapper.redirectedToDesktopApp')} - {'\n'} - {this.props.translate('deeplinkWrapper.youCanAlso')} - {' '} - this.setState({deeplinkMatch: false})}> - {this.props.translate('deeplinkWrapper.openLinkInBrowser')} - - . - - - - - - - - ); - } - return this.props.children; } } DeeplinkWrapper.propTypes = propTypes; -export default compose( - withLocalize, - withOnyx({ - betas: {key: ONYXKEYS.BETAS}, - }), -)(DeeplinkWrapper); +DeeplinkWrapper.defaultProps = defaultProps; +export default withOnyx({ + betas: {key: ONYXKEYS.BETAS}, +})(DeeplinkWrapper); diff --git a/src/languages/en.js b/src/languages/en.js index 2996af69d2a0..66b44aeb8b4f 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -155,12 +155,6 @@ export default { updateApp: 'Update app', updatePrompt: 'A new version of this app is available.\nUpdate now or restart the app at a later time to download the latest changes.', }, - deeplinkWrapper: { - launching: 'Launching Expensify', - redirectedToDesktopApp: 'We\'ve redirected you to the desktop app.', - youCanAlso: 'You can also', - openLinkInBrowser: 'open this link in your browser', - }, validateCodeModal: { successfulSignInTitle: 'Abracadabra,\nyou are signed in!', successfulSignInDescription: 'Head back to your original tab to continue.', diff --git a/src/languages/es.js b/src/languages/es.js index d9007d3d41df..af0cafd9aa33 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -154,12 +154,6 @@ export default { updateApp: 'Actualizar app', updatePrompt: 'Existe una nueva versión de esta aplicación.\nActualiza ahora or reinicia la aplicación más tarde para recibir la última versión.', }, - deeplinkWrapper: { - launching: 'Cargando Expensify', - redirectedToDesktopApp: 'Te hemos redirigido a la aplicación de escritorio.', - youCanAlso: 'También puedes', - openLinkInBrowser: 'abrir este enlace en tu navegador', - }, validateCodeModal: { successfulSignInTitle: 'Abracadabra,\n¡sesión iniciada!', successfulSignInDescription: 'Vuelve a la pestaña original para continuar.',