forked from shevon14/FloatingActionButton-RN
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
74 lines (63 loc) · 1.88 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
65
66
67
68
69
70
71
72
73
74
import 'react-native-gesture-handler';
import { registerRootComponent } from 'expo';
import React, { useState, useEffect } from 'react';
import { StyleSheet,
Text,
TextInput,
View,
Dimensions,
Button,
Image } from 'react-native';
// ------------ navigation -------------------
import { NavigationContainer } from '@react-navigation/native';
// for tuto v using Stack
import { createNativeStackNavigator } from '@react-navigation/native-stack';
// for real v using Drawer
import { createDrawerNavigator } from '@react-navigation/drawer';
// DrawerContentScrollView,
// DrawerItemList,
// DrawerItem,
// useDrawerProgress,
// screens
import HelpScreen from 'src/screens/HelpScreen';
import HomeScreen from 'src/screens/HomeScreen';
import CreatePostScreen from 'src/screens/CreatePostScreen';
// components
import LogoTitle from 'src/components/LogoTitleComp';
import FloatingButton from 'src/components/FloatingActionButton';
import ButtonCustom from 'src/components/ButtonOptions';
// not useful for now
import Animated from 'react-native-reanimated';
import MapView, {Marker} from 'react-native-maps';
import { StatusBar } from 'expo-status-bar';
import * as Location from 'expo-location';
// --------------- END OF IMPORTS --------------------
// ----------------- START OF APP CODE ----------------
const Stack = createNativeStackNavigator();
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator
mode="modal"
screenOptions={{
headerStyle: {
backgroundColor: '#f4511e',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
>
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
headerTitle: (props) => <LogoTitle {...props} />,
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
registerRootComponent(App);