adding a disclaimer on loading screen that loading takes time, so people don't drop

This commit is contained in:
0xturboblitz
2025-03-11 18:28:52 -07:00
parent 7b337105f8
commit d6401128e3

View File

@@ -1,5 +1,5 @@
import React, { useEffect, useRef, useState } from 'react';
import { StyleSheet } from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
import { StaticScreenProps, useNavigation } from '@react-navigation/native';
import LottieView from 'lottie-react-native';
@@ -114,18 +114,27 @@ const LoadingScreen: React.FC<LoadingScreenProps> = ({}) => {
}, []);
return (
<LottieView
autoPlay
loop={animationSource === miscAnimation}
source={animationSource}
style={styles.animation}
resizeMode="cover"
renderMode="HARDWARE"
/>
<View style={styles.container}>
<LottieView
autoPlay
loop={animationSource === miscAnimation}
source={animationSource}
style={styles.animation}
resizeMode="cover"
renderMode="HARDWARE"
/>
<Text style={styles.warningText}>
This can take up to one minute, don't close the app
</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
position: 'relative',
},
animation: {
position: 'absolute',
top: 0,
@@ -133,6 +142,17 @@ const styles = StyleSheet.create({
right: 0,
bottom: 0,
},
warningText: {
position: 'absolute',
bottom: 40,
left: 0,
right: 0,
textAlign: 'center',
color: 'white',
fontSize: 16,
fontWeight: '500',
padding: 16,
},
});
export default LoadingScreen;