Skip to content

Commit d4e7484

Browse files
committed
Navigating from intro screen to signuporlogin screen to feed screen is now smooth
1 parent 2f9b41f commit d4e7484

File tree

4 files changed

+62
-10
lines changed

4 files changed

+62
-10
lines changed

navigation/MainNavigator.js

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const FeedNavigator = createDrawerNavigator(
124124
}}
125125
logoutOnPress={() => {
126126
dispatch(logout());
127-
navData.navigation.navigate("StartAuth");
127+
navData.navigation.navigate("SignupOrLogin");
128128
}}
129129
/>
130130
);
@@ -273,7 +273,7 @@ const ProfileNavigator = createDrawerNavigator(
273273
}}
274274
logoutOnPress={() => {
275275
dispatch(logout());
276-
navData.navigation.navigate("StartAuth");
276+
navData.navigation.navigate("SignupOrLogin");
277277
}}
278278
/>
279279
);
@@ -345,18 +345,68 @@ const IntroStack = createStackNavigator(
345345
},
346346
{
347347
headerMode: "none",
348+
headerShown: false,
348349
navigationOptions: {
349350
headerVisible: false,
350351
},
351352
}
352353
);
353354

354-
const MainNavigator = createSwitchNavigator({
355+
const MainNavigator = createStackNavigator({
356+
Intro: {
357+
screen: IntroStack,
358+
navigationOptions: {
359+
headerMode: "none",
360+
headerShown: false,
361+
navigationOptions: {
362+
headerVisible: false,
363+
},
364+
},
365+
},
366+
StartAuth: {
367+
screen: StartSignup,
368+
navigationOptions: {
369+
headerMode: "none",
370+
headerShown: false,
371+
navigationOptions: {
372+
headerVisible: false,
373+
},
374+
},
375+
},
376+
PermissionsStack: {
377+
screen: Permissions,
378+
navigationOptions: {
379+
headerMode: "none",
380+
headerShown: false,
381+
navigationOptions: {
382+
headerVisible: false,
383+
},
384+
},
385+
},
386+
Exhibit: {
387+
screen: FullAppNavigator,
388+
navigationOptions: {
389+
headerMode: "none",
390+
headerShown: false,
391+
navigationOptions: {
392+
headerVisible: false,
393+
},
394+
},
395+
},
396+
});
397+
398+
const StartUpNavigator = createSwitchNavigator({
355399
Startup: StartupScreen,
356-
Intro: IntroStack,
357-
StartAuth: StartSignup,
358-
PermissionsStack: Permissions,
359-
Exhibit: FullAppNavigator,
400+
MainNavigator: {
401+
screen: MainNavigator,
402+
navigationOptions: {
403+
headerMode: "none",
404+
headerShown: false,
405+
navigationOptions: {
406+
headerVisible: false,
407+
},
408+
},
409+
},
360410
});
361411

362-
export default createAppContainer(MainNavigator);
412+
export default createAppContainer(StartUpNavigator);

screens/StartupScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const StartupScreen = (props) => {
4040
return;
4141
}
4242
if (introing) {
43-
props.navigation.navigate("Intro");
43+
props.navigation.navigate("MainNavigator");
4444
return;
4545
}
4646

screens/auth/IntroScreen.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ IntroScreen.navigationOptions = () => {
189189
return {
190190
headerMode: "none",
191191
headerVisible: false,
192+
headerShown: false,
192193
};
193194
};
194195

screens/auth/PhotoPermissionsScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ PhotoPermissionsScreen.navigationOptions = (navData) => {
8484
headerStyle: {
8585
backgroundColor: "black",
8686
},
87+
headerLeft: () => {},
8788
};
8889
};
8990

@@ -96,7 +97,7 @@ const styles = StyleSheet.create({
9697
alignItems: "center",
9798
},
9899
image: {
99-
width: 300,
100+
width: 300,
100101
height: 300,
101102
},
102103
text: {

0 commit comments

Comments
 (0)