fixed dark mode splash screen

This commit is contained in:
ue 2019-11-10 00:30:04 +03:00
parent 4c01d47f0e
commit 57e3663123
2 changed files with 8 additions and 2 deletions

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from 'react';
import { View } from 'react-native'; import { View } from 'react-native';
import LottieView from 'lottie-react-native'; import LottieView from 'lottie-react-native';
import { initialMode as nativeThemeInitialMode } from 'react-native-dark-mode';
import styles from './launchStyles'; import styles from './launchStyles';
const LaunchScreen = () => ( const LaunchScreen = () => (
<View style={styles.container}> <View style={nativeThemeInitialMode !== 'dark' ? styles.container : styles.darkContainer}>
<LottieView source={require('./animation.json')} autoPlay loop={false} /> <LottieView source={require('./animation.json')} autoPlay loop={false} />
</View> </View>
); );

View File

@ -6,4 +6,10 @@ export default EStyleSheet.create({
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}, },
darkContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#1e2835',
},
}); });