-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
33 lines (29 loc) · 1.13 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
import React from 'react';
import {useFonts, Roboto_400Regular, Roboto_700Bold} from '@expo-google-fonts/roboto';
import { NativeBaseProvider, StatusBar } from "native-base";
import { THEME } from './src/styles/theme';
import { Loading } from './src/components/Loading';
import { SignIn } from './src/screens/SignIn';
import { Home } from './src/screens/Home';
import { Register } from './src/screens/Register';
import { Routes } from './src/routes';
export default function App() {
//carrega as fonts antes do aplicativo ser carragado totalmente
const [fontLoadead] = useFonts({
Roboto_400Regular,
Roboto_700Bold
})
return (
//Necessário para que a aplicação consiga utilizar o native-base
//theme={THEME} -> funciona para que os estilos utilizados sejam os que configuramos na pasta theme, e não os que vem por padrão no framework
<NativeBaseProvider theme={THEME}>
<StatusBar
barStyle='light-content'
backgroundColor='transparent'
translucent
/>
{/* if ternario -> é um condicional booleano */}
{fontLoadead ? <Routes/>:<Loading/>}
</NativeBaseProvider>
);
}