-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (28 loc) · 901 Bytes
/
index.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
/**
* @format
*/
import * as React from 'react';
import {AppRegistry} from 'react-native';
import {Provider as PaperProvider} from 'react-native-paper';
import {ApolloClient, InMemoryCache, ApolloProvider} from '@apollo/client';
import {name as appName} from './app.json';
import App from './src/App';
import TrackPlayer from 'react-native-track-player';
import {PlaybackService} from '~src/services/trackPlayer/PlaybackService';
import theme from './src/theme';
// Initialize Apollo Client
const client = new ApolloClient({
uri: 'http://FIXME:3000/graphql',
cache: new InMemoryCache(),
});
export default function Main() {
return (
<PaperProvider theme={theme}>
<ApolloProvider client={client}>
<App />
</ApolloProvider>
</PaperProvider>
);
}
AppRegistry.registerComponent(appName, () => Main);
TrackPlayer.registerPlaybackService(() => PlaybackService);