Skip to content

Commit 3f62b18

Browse files
committed
Dependencies updated & Stack navigator issues fixed
1 parent f6d9a78 commit 3f62b18

2 files changed

Lines changed: 43 additions & 41 deletions

File tree

navigation/Screens.js

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
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";
87
import { Block } from "galio-framework";
9-
8+
// drawer
9+
import CustomDrawerContent from "./Menu";
10+
import Elements from "../screens/Elements";
1011
// screens
1112
import Home from "../screens/Home";
1213
import Onboarding from "../screens/Onboarding";
1314
import Pro from "../screens/Pro";
1415
import Profile from "../screens/Profile";
16+
import React from "react";
1517
import 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

2522
const { width } = Dimensions.get("screen");
2623

@@ -30,18 +27,23 @@ const Tab = createBottomTabNavigator();
3027

3128
function 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-

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,27 @@
1414
"url": "git+https://github.com/creativetimofficial/argon-react-native.git"
1515
},
1616
"dependencies": {
17-
"@react-native-community/masked-view": "0.1.10",
18-
"@react-navigation/bottom-tabs": "^5.5.1",
17+
"@react-native-masked-view/masked-view": "0.2.4",
18+
"@react-navigation/bottom-tabs": "^6.3.1",
1919
"@react-navigation/compat": "^5.1.25",
2020
"@react-navigation/drawer": "5.12.4",
21-
"@react-navigation/native": "5.9.3",
22-
"@react-navigation/stack": "5.14.3",
21+
"@react-navigation/native": "^6.0.10",
22+
"@react-navigation/stack": "^6.2.1",
2323
"@use-expo/font": "^2.0.0",
2424
"expo": "^42.0.0",
25-
"expo-app-loading": "^1.0.1",
25+
"expo-app-loading": "1.1.2",
2626
"expo-asset": "~8.3.2",
2727
"expo-font": "~9.2.1",
28+
"expo-modules-core": "^0.2.0",
2829
"galio-framework": "^0.8.0",
2930
"prop-types": "^15.7.2",
3031
"react": "16.13.1",
3132
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
32-
"react-native-gesture-handler": "~1.10.2",
33+
"react-native-gesture-handler": "^1.10.3",
3334
"react-native-modal-dropdown": "git+https://github.com/siemiatj/react-native-modal-dropdown.git",
3435
"react-native-reanimated": "~2.2.0",
3536
"react-native-safe-area-context": "3.2.0",
36-
"react-native-screens": "~3.4.0"
37+
"react-native-screens": "^3.4.0"
3738
},
3839
"devDependencies": {
3940
"babel-preset-expo": "8.3.0"

0 commit comments

Comments
 (0)