AuthLoadingView
This commit is contained in:
parent
99e4dfcce0
commit
c60bdfb208
|
@ -2,6 +2,8 @@ import React from 'react';
|
||||||
import {
|
import {
|
||||||
View, Text, StyleSheet, ActivityIndicator
|
View, Text, StyleSheet, ActivityIndicator
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import StatusBar from '../containers/StatusBar';
|
import StatusBar from '../containers/StatusBar';
|
||||||
|
@ -24,9 +26,7 @@ const styles = StyleSheet.create({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default React.memo(withTheme(({ theme, route }) => {
|
const AuthLoadingView = React.memo(({ theme, text }) => (
|
||||||
const text = route.params?.text;
|
|
||||||
return (
|
|
||||||
<View style={[styles.container, { backgroundColor: themes[theme].backgroundColor }]}>
|
<View style={[styles.container, { backgroundColor: themes[theme].backgroundColor }]}>
|
||||||
<StatusBar theme={theme} />
|
<StatusBar theme={theme} />
|
||||||
{text && (
|
{text && (
|
||||||
|
@ -36,5 +36,15 @@ export default React.memo(withTheme(({ theme, route }) => {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
);
|
));
|
||||||
}));
|
|
||||||
|
const mapStateToProps = state => ({
|
||||||
|
text: state.app.text
|
||||||
|
});
|
||||||
|
|
||||||
|
AuthLoadingView.propTypes = {
|
||||||
|
theme: PropTypes.string,
|
||||||
|
text: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(withTheme(AuthLoadingView));
|
||||||
|
|
Loading…
Reference in New Issue