diff --git a/apps/mobile/src/components/SplashScreen/index.js b/apps/mobile/src/components/SplashScreen/index.js index d9b26db3b..fc1c4787e 100644 --- a/apps/mobile/src/components/SplashScreen/index.js +++ b/apps/mobile/src/components/SplashScreen/index.js @@ -24,6 +24,7 @@ import Paragraph from '../Typography/Paragraph'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import {DDS} from '../../services/DeviceDetection'; import {openLinkInBrowser} from '../../utils/functions'; +import {Modal} from 'react-native'; const features = [ { @@ -70,11 +71,9 @@ const SplashScreen = () => { const [isNext, setIsNext] = useState(true); const opacity = useValue(0); - const translateY = useValue(20); - const translateY2 = useValue(0); useEffect(() => { - Storage.read('introCompleted').then(async (r) => { + Storage.read('introCompleted').then(async r => { requestAnimationFrame(() => { if (!r) { setVisible(true); @@ -83,185 +82,175 @@ const SplashScreen = () => { duration: 500, easing: Easing.in(Easing.ease), }).start(); - timing(translateY, { - toValue: 0, - duration: 500, - easing: Easing.in(Easing.ease), - }).start(); } }); }); }, []); const hide = async () => { - timing(translateY2, { - toValue: dHeight * 2, - duration: 500, - easing: Easing.in(Easing.ease), - }).start(); - await sleep(500); setVisible(false); }; return ( visible && ( - + - - ( - + + + { + currentIndex = i; + }} + activeAnimationType="timing" + shouldOptimizeUpdates + renderItem={({item, index}) => ( - {item.type === 'image' ? ( - - ) : item.type === 'icon' ? ( - - ) : ( - - )} - - {item.title && ( - - {item.title} - - )} - - {item.description && ( - - {item.description} - - )} - - {item.link && ( -