Skip to content

Commit

Permalink
Fix app start navigation logic (#3261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cal-L authored Oct 5, 2021
1 parent d502f24 commit d8a85ab
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions app/components/Views/Entry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,8 @@ const Entry = (props) => {
useNativeDriver: true,
isInteraction: false,
}).start(() => {
if (viewToGo === 'OptinMetrics') {
props.navigation.navigate('OnboardingRootNav', {
screen: 'OnboardingNav',
params: { screen: 'OptinMetrics' },
});
} else if (viewToGo && (viewToGo !== 'WalletView' || viewToGo !== 'Onboarding')) {
props.navigation.navigate(viewToGo);
} else if (viewToGo === 'Onboarding') {
props.navigation.navigate('OnboardingRootNav');
} else {
props.navigation.navigate('HomeNav');
}
const screen = viewToGo || 'OnboardingRootNav';
props.navigation.navigate(screen);
});
}, [opacity, viewToGo, props.navigation]);

Expand Down Expand Up @@ -130,12 +120,10 @@ const Entry = (props) => {
}
// Get onboarding wizard state
const onboardingWizard = await DefaultPreference.get(ONBOARDING_WIZARD);
if (onboardingWizard) {
animateAndGoTo('HomeNav');
} else {
if (!onboardingWizard) {
props.setOnboardingWizardStep(1);
animateAndGoTo('WalletView');
}
animateAndGoTo('HomeNav');
} else if (props.passwordSet) {
animateAndGoTo('Login');
} else {
Expand Down

0 comments on commit d8a85ab

Please sign in to comment.