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 { View } from 'react-native';
import LottieView from 'lottie-react-native';
import { initialMode as nativeThemeInitialMode } from 'react-native-dark-mode';
import styles from './launchStyles';
const LaunchScreen = () => (
<View style={styles.container}>
<View style={nativeThemeInitialMode !== 'dark' ? styles.container : styles.darkContainer}>
<LottieView source={require('./animation.json')} autoPlay loop={false} />
</View>
);

View File

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