-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
59 lines (51 loc) · 1.42 KB
/
App.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React from "react";
import { ThemeProvider } from "styled-components/native";
import { theme } from "./src/infra/theme";
import { Navigation } from "./src/infra/navigation";
import FlashMessage from "react-native-flash-message";
import {
useFonts as useInterFont,
Inter_500Medium,
Inter_600SemiBold,
} from "@expo-google-fonts/inter";
import {
useFonts as usePoppinsFont,
Poppins_700Bold,
Poppins_800ExtraBold,
Poppins_600SemiBold,
} from "@expo-google-fonts/poppins";
import { AuthProvider } from "./src/provider/auth";
import { SafeAreaView } from "react-native";
import styled from "styled-components";
const AlertMessage = styled(FlashMessage)`
background-color: ${(props) => props.theme.colors.primary.main};
border-radius: ${(props) => props.theme.sizes.borderRadius.sm};
width: 50%;
align-self: center;
`;
export default function App() {
const [interLoaded] = useInterFont({
Inter_500Medium,
Inter_600SemiBold,
});
const [poppinsLoaded] = usePoppinsFont({
Poppins_600SemiBold,
Poppins_700Bold,
Poppins_800ExtraBold,
});
if (!interLoaded || !poppinsLoaded) {
return;
}
return (
<>
<ThemeProvider theme={theme}>
<AuthProvider>
<SafeAreaView style={{ flex: 1, backgroundColor: "#f5f5f5" }}>
<Navigation />
</SafeAreaView>
</AuthProvider>
<AlertMessage position="top" />
</ThemeProvider>
</>
);
}