import React, { useRef, useEffect } from 'react'; import { View, Animated, useWindowDimensions } from 'react-native'; import { Fonts } from '../../styles'; import { useColors } from '../../themes'; import { scaleDimension } from '../../common/utils'; const Splash = () => { const Colors = useColors(); const x = useWindowDimensions().width / 2 - 40; const y = useWindowDimensions().height / 2 - 80; const animatedLogo = useRef(new Animated.ValueXY()).current; const opacity = useRef(new Animated.Value(0)).current; useEffect(() => { Animated.parallel([ Animated.timing(opacity, { toValue: 1, duration: 3000, useNativeDriver: true, }), Animated.timing(animatedLogo, { toValue: { x: -x, y: -y }, duration: 3000, useNativeDriver: true, }), ]).start(() => {}); }); const logo = { top: 0, height: scaleDimension(80), width: scaleDimension(80), borderRadius: 40, backgroundColor: Colors.primary, }; const logoName = { fontSize: Fonts.size.h2, color: Colors.font_2, }; return ( BrandName ); }; export default Splash;