diff --git a/app/views/AuthLoadingView.tsx b/app/views/AuthLoadingView.tsx
index 1bdeb063..b3402afe 100644
--- a/app/views/AuthLoadingView.tsx
+++ b/app/views/AuthLoadingView.tsx
@@ -1,11 +1,11 @@
import React from 'react';
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native';
-import { connect } from 'react-redux';
+import { useSelector } from 'react-redux';
+import { IApplicationState } from '../definitions';
import I18n from '../i18n';
import StatusBar from '../containers/StatusBar';
-import { TSupportedThemes, withTheme } from '../theme';
-import { themes } from '../lib/constants';
+import { useTheme } from '../theme';
import sharedStyles from './Styles';
const styles = StyleSheet.create({
@@ -22,25 +22,20 @@ const styles = StyleSheet.create({
}
});
-interface IAuthLoadingView {
- theme: TSupportedThemes;
- text: string;
-}
-
-const AuthLoadingView = React.memo(({ theme, text }: IAuthLoadingView) => (
-
-
- {text ? (
- <>
-
- {`${text}\n${I18n.t('Please_wait')}`}
- >
- ) : null}
-
-));
-
-const mapStateToProps = (state: any) => ({
- text: state.app.text
+const AuthLoadingView = React.memo((): React.ReactElement => {
+ const text = useSelector((state: IApplicationState) => state.app.text);
+ const { colors } = useTheme();
+ return (
+
+
+ {text ? (
+ <>
+
+ {`${text}\n${I18n.t('Please_wait')}`}
+ >
+ ) : null}
+
+ );
});
-export default connect(mapStateToProps)(withTheme(AuthLoadingView));
+export default AuthLoadingView;