mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
adding a disclaimer on loading screen that loading takes time, so people don't drop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user