-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
80 lines (68 loc) · 1.94 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React from 'react';
import { Dimensions, StyleSheet } from 'react-native';
const { width, height } = Dimensions.get('window');
import { StatusBar } from 'expo-status-bar';
import { SafeAreaView } from 'react-native-safe-area-context';
//Navigation
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
//Screens
import News from './src/screens/News';
import SplashScreen from './src/screens/SplashScreen';
import SavedNews from './src/screens/SavedNews';
// React Navigation Stacks
const RootStack = createStackNavigator();
export default function App() {
return (
<SafeAreaView style={{ flex: 1 }}>
<StatusBar backgroundColor='#181D31' style='light' />
<AppWrapper />
</SafeAreaView>
);
}
const AppWrapper = () => {
return (
<NavigationContainer>
<RootStack.Navigator initialRouteName='SplashScreen'>
<RootStack.Screen
name='News'
component={News}
options={{ headerShown: false }}
/>
<RootStack.Screen
name='SplashScreen'
component={SplashScreen}
options={{ headerShown: false }}
/>
<RootStack.Screen
name='SavedNews'
component={SavedNews}
options={{
headerShown: true,
headerTitle: 'Kaydedilenler',
headerTitleAlign: 'center',
headerTintColor: 'white',
headerTitleStyle: {
color: 'white',
fontSize: 25,
fontWeight: '800',
},
headerStyle: {
//borderWidth: 0.5,
backgroundColor: '#181D31' /* #333333*/,
},
}}
/>
</RootStack.Navigator>
</NavigationContainer>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
width: width,
height: height,
justifyContent: 'center',
alignItems: 'center',
},
});