-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
76 lines (65 loc) · 2.08 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
import React from "react";
import { SafeAreaView, StyleSheet} from "react-native";
import { NativeBaseProvider, Text, Box } from "native-base";
import { Button } from "native-base";
import { useFonts } from "expo-font";
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import {
SafeAreaProvider,
} from 'react-native-safe-area-context';
import HomeScreen from "./components/HomeScreen";
import NewsDetail from "./components/NewsDetail";
import {
Inter_100Thin,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
Inter_800ExtraBold,
Inter_900Black,
} from '@expo-google-fonts/inter';
export default function App() {
const Stack = createNativeStackNavigator();
let [fontsLoaded] = useFonts({
'Protest_Strike': require('./assets/fonts/Protest_Strike/ProtestStrike-Regular.ttf'),
'NewsReader': require('./assets/fonts/Newsreader/Newsreader-VariableFont_opsz,wght.ttf'),
Inter_100Thin,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
Inter_800ExtraBold,
Inter_900Black,
});
if (!fontsLoaded) {
return null;
}
return (
<NativeBaseProvider>
<NavigationContainer>
<Stack.Navigator
initialRouteName="HomeScreen"
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="HomeScreen" component={HomeScreen} />
<Stack.Screen
name="NewsDetail"
component={NewsDetail}
options={{ title: "" }}
/>
</Stack.Navigator>
</NavigationContainer>
</NativeBaseProvider>
);
}
{/* <Box flex={1} bg="#fff" borderRadius="5" borderColor='amber.100' alignItems="center" justifyContent="center">
<Text fontSize="xl" style={{fontFamily: 'Protest_Strike' }}>Open up App.js to start working on your app!</Text>
<Button>Click Me</Button>
</Box> */}