-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
36 lines (31 loc) · 1.21 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
import { useFonts } from 'expo-font';
import { ActivityIndicator } from 'react-native';
import { TailwindProvider } from 'tailwind-rn';
import { ApolloProvider } from '@apollo/client';
import { NavigationContainer } from '@react-navigation/native';
import { client } from './src/Apollo';
import RootNavigator from './src/Navigator/RootNavigator';
import utilities from './tailwind.json';
export default function App() {
const [fontsLoaded] = useFonts({
'Poppins-Regular': require('./assets/fonts/Poppins-Regular.ttf'),
'Poppins-SemiBold': require('./assets/fonts/Poppins-SemiBold.ttf'),
'Poppins-Bold': require('./assets/fonts/Poppins-Bold.ttf'),
'Poppins-Thin': require('./assets/fonts/Poppins-Thin.ttf'),
'Poppins-Medium': require('./assets/fonts/Poppins-Medium.ttf'),
'Poppins-Black': require('./assets/fonts/Poppins-Black.ttf'),
});
if (!fontsLoaded) {
return <ActivityIndicator />;
}
return (
// @ts-expect-error - TailwindProvider is missing a type definition
<TailwindProvider utilities={utilities}>
<ApolloProvider client={client}>
<NavigationContainer>
<RootNavigator />
</NavigationContainer>
</ApolloProvider>
</TailwindProvider>
);
}