-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
50 lines (44 loc) · 1.07 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
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
import MainView from './src/components/mainView/MainView';
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: 'tomato',
accent: 'gray',
},
};
const client = new ApolloClient({
uri: 'https://73ddoqlmy0.execute-api.ap-southeast-1.amazonaws.com/prod/',
cache: new InMemoryCache(),
defaultOptions: {
watchQuery: {
fetchPolicy: 'no-cache',
errorPolicy: 'ignore',
},
query: {
fetchPolicy: 'no-cache',
errorPolicy: 'all',
},
},
});
function App(): JSX.Element {
return (
<ApolloProvider client={client}>
<PaperProvider theme={theme}>
<View style={styles.container}>
<MainView />
</View>
</PaperProvider>
</ApolloProvider>
);
}
export default App;