diff --git a/app/views/AuthLoadingView.js b/app/views/AuthLoadingView.tsx similarity index 81% rename from app/views/AuthLoadingView.js rename to app/views/AuthLoadingView.tsx index e97c10d94..ef6e7b943 100644 --- a/app/views/AuthLoadingView.js +++ b/app/views/AuthLoadingView.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'; -import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import I18n from '../i18n'; @@ -23,25 +22,25 @@ const styles = StyleSheet.create({ } }); -const AuthLoadingView = React.memo(({ theme, text }) => ( +interface IAuthLoadingView { + theme: string; + text: string; +} + +const AuthLoadingView = React.memo(({ theme, text }: IAuthLoadingView) => ( - {text && ( + {text ? ( <> {`${text}\n${I18n.t('Please_wait')}`} - )} + ) : null} )); -const mapStateToProps = state => ({ +const mapStateToProps = (state: any) => ({ text: state.app.text }); -AuthLoadingView.propTypes = { - theme: PropTypes.string, - text: PropTypes.string -}; - export default connect(mapStateToProps)(withTheme(AuthLoadingView));