-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
31 lines (25 loc) · 794 Bytes
/
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
import 'react-native-gesture-handler';
import { NavigationContainer } from '@react-navigation/native';
import { NunitoSans_400Regular, NunitoSans_700Bold } from '@expo-google-fonts/nunito-sans';
import { StackNavigator } from '~/routes/stack.navigator';
import { ThemeProvider } from 'styled-components';
import theme from '~/theme';
import { useFonts } from 'expo-font';
import { ActivityIndicator } from 'react-native';
export default function App() {
const [fontsLoaded] = useFonts({
NunitoSans_400Regular,
NunitoSans_700Bold,
});
if (!fontsLoaded) {
return <ActivityIndicator />;
} else {
return (
<NavigationContainer>
<ThemeProvider theme={theme}>
<StackNavigator />
</ThemeProvider>
</NavigationContainer>
);
}
}