-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
51 lines (44 loc) · 1.48 KB
/
App.tsx
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import {View, Text, SafeAreaView, ScrollView, StyleSheet} from 'react-native';
import React from 'react';
import {LogBox} from 'react-native';
import {useColorScheme} from 'react-native';
import {PaperProvider} from 'react-native-paper';
import {ApolloProvider, useQuery, gql} from '@apollo/client';
import {
ActivityIndicator,
MD3DarkTheme,
MD3LightTheme,
} from 'react-native-paper';
import client from './apolloClient';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Animedetail from './components/Animedetail.js';
import MyComponent from './components/MyComponent';
const Stack = createNativeStackNavigator();
const App = () => {
const colorScheme = useColorScheme();
const paperTheme =
colorScheme === 'dark' ? {...MD3DarkTheme} : {...MD3LightTheme};
React.useEffect(() => {
LogBox.ignoreLogs(['VirtualizedLists should never be nested']);
}, []);
return (
<ApolloProvider client={client}>
<PaperProvider theme={paperTheme}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="AnimeMAX" component={MyComponent} />
<Stack.Screen name="AnimeDetail" component={Animedetail} />
</Stack.Navigator>
</NavigationContainer>
</PaperProvider>
</ApolloProvider>
);
};
export default App;