forked from mooco-renew/mooco-RN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
80 lines (75 loc) · 2.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
75
76
77
78
79
80
import React, { useEffect } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
/* 네비게이션 스타일 */
import { backbtncolorbar } from "./src/components/navigation/bar/BackBtnColorBar";
/* screens */
import Daily from "./src/screens/daily/Daily";
import Agreement from "./src/screens/account/Agreement";
import KakaoLoginScreen from "./src/screens/login/KakaoLogin";
import GoogleLoginScreen from "./src/screens/login/GoogleLogin";
import GetProfile from "./src/screens/account/Getprofile";
import OnBoarding from "./src/screens/onboarding/OnBoarding";
import FriendsList from "./src/screens/friends/FriendsList";
import RequestFriends from "./src/screens/friends/RequestFriends";
import DailyPost from "./src/screens/daily/DailyPost";
import DailyUpload from "./src/screens/daily/DailyUpload";
import AppBar from "./src/components/navigation/bar/AppBar";
import { NativeBaseProvider } from "native-base";
import HomeTab from "./src/screens/homeTab/homeTab";
// rn navigatior로 stack 생성, rn은 stack으로 사용자의 이동을 확인한다.
const Stack = createNativeStackNavigator();
/*
screen 숨기고 싶으면 아래 코드로 변경(스크린 옵션 추가)
<Stack.Navigator screenOptions={{ headerShown: false }}>)
*/
// 맨 위 코드가 첫 번째 스크린
function App() {
return (
<NavigationContainer>
<NativeBaseProvider>
<Stack.Navigator>
<Stack.Screen
name="OnBoarding"
component={OnBoarding}
options={{ headerShown: false }}
/>
<Stack.Screen
name="GetProfile"
component={GetProfile}
options={{ ...backbtncolorbar, title: "프로필 편집" }}
/>
<Stack.Screen name="KakaoLogin" component={KakaoLoginScreen} />
<Stack.Screen name="GoogleLogin" component={GoogleLoginScreen} />
<Stack.Screen
name="FriendsList"
component={FriendsList}
options={{ ...backbtncolorbar, title: "친구 목록 및 추가" }}
/>
<Stack.Screen
name="RequestFriends"
component={RequestFriends}
options={{ ...backbtncolorbar, title: "친구 요청" }}
/>
<Stack.Screen
name="Home"
component={HomeTab}
options={({ navigation }) => AppBar({ navigation })}
/>
<Stack.Screen name="Daily" component={Daily} />
<Stack.Screen
name="DailyPost"
component={DailyPost}
options={{ headerShown: false }}
/>
<Stack.Screen
name="DailyUpload"
component={DailyUpload}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NativeBaseProvider>
</NavigationContainer>
);
}
export default App;