1- import React from "react" ;
2- import { Easing , Animated , Dimensions } from "react-native" ;
3-
4- import { createStackNavigator } from "@react-navigation/stack" ;
5- import { createDrawerNavigator } from "@react-navigation/drawer" ;
6- import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" ;
1+ import { Animated , Dimensions , Easing } from "react-native" ;
2+ // header for screens
3+ import { Header , Icon } from "../components" ;
4+ import { argonTheme , tabs } from "../constants" ;
75
6+ import Articles from "../screens/Articles" ;
87import { Block } from "galio-framework" ;
9-
8+ // drawer
9+ import CustomDrawerContent from "./Menu" ;
10+ import Elements from "../screens/Elements" ;
1011// screens
1112import Home from "../screens/Home" ;
1213import Onboarding from "../screens/Onboarding" ;
1314import Pro from "../screens/Pro" ;
1415import Profile from "../screens/Profile" ;
16+ import React from "react" ;
1517import Register from "../screens/Register" ;
16- import Elements from "../screens/Elements" ;
17- import Articles from "../screens/Articles" ;
18- // drawer
19- import CustomDrawerContent from "./Menu" ;
20-
21- // header for screens
22- import { Icon , Header } from "../components" ;
23- import { argonTheme , tabs } from "../constants" ;
18+ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" ;
19+ import { createDrawerNavigator } from "@react-navigation/drawer" ;
20+ import { createStackNavigator } from "@react-navigation/stack" ;
2421
2522const { width } = Dimensions . get ( "screen" ) ;
2623
@@ -30,18 +27,23 @@ const Tab = createBottomTabNavigator();
3027
3128function ElementsStack ( props ) {
3229 return (
33- < Stack . Navigator mode = "card" headerMode = "screen" >
30+ < Stack . Navigator
31+ screenOptions = { {
32+ mode : "card" ,
33+ headerShown : false ,
34+ } }
35+ >
3436 < Stack . Screen
3537 name = "Elements"
3638 component = { Elements }
3739 options = { {
3840 header : ( { navigation, scene } ) => (
3941 < Header title = "Elements" navigation = { navigation } scene = { scene } />
4042 ) ,
41- cardStyle : { backgroundColor : "#F8F9FE" }
43+ cardStyle : { backgroundColor : "#F8F9FE" } ,
4244 } }
4345 />
44- < Stack . Screen
46+ < Stack . Screen
4547 name = "Pro"
4648 component = { Pro }
4749 options = { {
@@ -55,7 +57,7 @@ function ElementsStack(props) {
5557 scene = { scene }
5658 />
5759 ) ,
58- headerTransparent : true
60+ headerTransparent : true ,
5961 } }
6062 />
6163 </ Stack . Navigator >
@@ -72,10 +74,10 @@ function ArticlesStack(props) {
7274 header : ( { navigation, scene } ) => (
7375 < Header title = "Articles" navigation = { navigation } scene = { scene } />
7476 ) ,
75- cardStyle : { backgroundColor : "#F8F9FE" }
77+ cardStyle : { backgroundColor : "#F8F9FE" } ,
7678 } }
7779 />
78- < Stack . Screen
80+ < Stack . Screen
7981 name = "Pro"
8082 component = { Pro }
8183 options = { {
@@ -89,7 +91,7 @@ function ArticlesStack(props) {
8991 scene = { scene }
9092 />
9193 ) ,
92- headerTransparent : true
94+ headerTransparent : true ,
9395 } }
9496 />
9597 </ Stack . Navigator >
@@ -113,10 +115,10 @@ function ProfileStack(props) {
113115 />
114116 ) ,
115117 cardStyle : { backgroundColor : "#FFFFFF" } ,
116- headerTransparent : true
118+ headerTransparent : true ,
117119 } }
118120 />
119- < Stack . Screen
121+ < Stack . Screen
120122 name = "Pro"
121123 component = { Pro }
122124 options = { {
@@ -130,7 +132,7 @@ function ProfileStack(props) {
130132 scene = { scene }
131133 />
132134 ) ,
133- headerTransparent : true
135+ headerTransparent : true ,
134136 } }
135137 />
136138 </ Stack . Navigator >
@@ -153,7 +155,7 @@ function HomeStack(props) {
153155 scene = { scene }
154156 />
155157 ) ,
156- cardStyle : { backgroundColor : "#F8F9FE" }
158+ cardStyle : { backgroundColor : "#F8F9FE" } ,
157159 } }
158160 />
159161 < Stack . Screen
@@ -170,7 +172,7 @@ function HomeStack(props) {
170172 scene = { scene }
171173 />
172174 ) ,
173- headerTransparent : true
175+ headerTransparent : true ,
174176 } }
175177 />
176178 </ Stack . Navigator >
@@ -184,7 +186,7 @@ export default function OnboardingStack(props) {
184186 name = "Onboarding"
185187 component = { Onboarding }
186188 option = { {
187- headerTransparent : true
189+ headerTransparent : true ,
188190 } }
189191 />
190192 < Stack . Screen name = "App" component = { AppStack } />
@@ -196,10 +198,10 @@ function AppStack(props) {
196198 return (
197199 < Drawer . Navigator
198200 style = { { flex : 1 } }
199- drawerContent = { props => < CustomDrawerContent { ...props } /> }
201+ drawerContent = { ( props ) => < CustomDrawerContent { ...props } /> }
200202 drawerStyle = { {
201203 backgroundColor : "white" ,
202- width : width * 0.8
204+ width : width * 0.8 ,
203205 } }
204206 drawerContentOptions = { {
205207 activeTintcolor : "white" ,
@@ -213,13 +215,13 @@ function AppStack(props) {
213215 justifyContent : "center" ,
214216 alignContent : "center" ,
215217 alignItems : "center" ,
216- overflow : "hidden"
218+ overflow : "hidden" ,
217219 } ,
218220 labelStyle : {
219221 fontSize : 18 ,
220222 marginLeft : 12 ,
221- fontWeight : "normal"
222- }
223+ fontWeight : "normal" ,
224+ } ,
223225 } }
224226 initialRouteName = "Home"
225227 >
@@ -231,4 +233,3 @@ function AppStack(props) {
231233 </ Drawer . Navigator >
232234 ) ;
233235}
234-
0 commit comments