-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
50 lines (41 loc) · 1.69 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 * as SplashScreen from 'expo-splash-screen';
import { useFonts } from 'expo-font';
import { Ubuntu_400Regular, Ubuntu_500Medium, Ubuntu_700Bold } from '@expo-google-fonts/ubuntu';
import { FC } from 'react';
import { Provider as ReduxProvider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { QueryClientProvider } from '@tanstack/react-query';
import { NavigationContainer } from '@react-navigation/native';
import { StripeProvider } from '@stripe/stripe-react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { queryClient } from '@services/queryClient';
import { store, persistor } from '@store/index';
import { SettingsProvider } from '@contexts/SettingsContext';
import { Routes } from '@routes/index.routes';
export const App: FC = () => {
SplashScreen.preventAutoHideAsync();
const [fontsLoaded] = useFonts({
Ubuntu_400Regular,
Ubuntu_500Medium,
Ubuntu_700Bold,
});
if (!fontsLoaded) return null;
SplashScreen.hideAsync();
return (
<NavigationContainer>
<ReduxProvider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SettingsProvider>
<QueryClientProvider client={queryClient}>
<StripeProvider publishableKey="pk_test_51NH8zyJI8OUd1JcmCGy1Swtryfp5tfd9n6QXMratfMs3eqjClBJG0OGvxBHLYSiqI89NO5h6JsvZyaTCzEWCR9Ep00VoTUOzxj">
<GestureHandlerRootView style={{ flex: 1 }}>
<Routes />
</GestureHandlerRootView>
</StripeProvider>
</QueryClientProvider>
</SettingsProvider>
</PersistGate>
</ReduxProvider>
</NavigationContainer>
);
};