-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
64 lines (62 loc) · 1.78 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
60
61
62
63
64
import { StatusBar } from "expo-status-bar";
import AppLoading from "expo-app-loading";
import { NavigationContainer } from "@react-navigation/native";
import { ScaledSheet } from "react-native-size-matters";
import {
useFonts,
Tajawal_300Light,
Tajawal_400Regular,
Tajawal_500Medium,
Tajawal_800ExtraBold,
} from "@expo-google-fonts/tajawal";
import * as serviceWorkerRegistration from "./src/serviceWorkerRegistration";
import CustomDrawerNavigatorRight from "./components/CustomDrawerNavigatorRight";
import Animation from "./components/Animation";
export default function App() {
const requestOptions = {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ projectId: "626f16dbf0485e0004efca50" }),
};
fetch(
"https://feeder-node-1337.herokuapp.com/feedback/create",
requestOptions
)
.then((res) => res.json())
.then((res) => console.log(res));
const [fontsLoaded] = useFonts({
Tajawal_300Light,
Tajawal_400Regular,
Tajawal_500Medium,
Tajawal_800ExtraBold,
});
if (!fontsLoaded) {
return <AppLoading />;
}
return (
<>
<StatusBar style="auto" />
<NavigationContainer>
<CustomDrawerNavigatorRight font={TajawalFontFamily} />
</NavigationContainer>
</>
);
}
const TajawalFontFamily = ScaledSheet.create({
ExtraBold: {
fontFamily: "Tajawal_800ExtraBold",
},
Light: {
fontFamily: "Tajawal_300Light",
},
Regular: {
fontFamily: "Tajawal_400Regular",
},
Medium: {
fontFamily: "Tajawal_500Medium",
},
});
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://cra.link/PWA
serviceWorkerRegistration.unregister();