-
Notifications
You must be signed in to change notification settings - Fork 5
/
App.js
46 lines (43 loc) · 1.44 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
import React from 'react';
import {useColorScheme} from 'react-native';
import {QueryClient, QueryClientProvider} from 'react-query';
import {
NavigationContainer,
DarkTheme,
DefaultTheme,
} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import TabToStackConnector from './src/screens/TabToStackConnector';
import ArticleWebView from './src/screens/ArticleWebView';
import CatagoryArticleScreen from './src/screens/CategoryArticleView';
const Stack = createNativeStackNavigator();
const queryClient = new QueryClient();
export default function App() {
const colorScheme = useColorScheme();
console.log('colorScheme', colorScheme);
// listen to color scheme changes
return (
<QueryClientProvider client={queryClient}>
<NavigationContainer
theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Stack.Navigator>
<Stack.Screen
name="Home"
component={TabToStackConnector}
options={{headerShown: false}}
/>
<Stack.Screen
name="ArticleWebView"
component={ArticleWebView}
options={{headerShown: false}}
/>
<Stack.Screen
name="CategoryArticles"
component={CatagoryArticleScreen}
options={{headerShown: false}}
/>
</Stack.Navigator>
</NavigationContainer>
</QueryClientProvider>
);
}