diff --git a/App.js b/App.js index 30c5673c..bfc87c1e 100644 --- a/App.js +++ b/App.js @@ -440,6 +440,7 @@ class App extends React.Component { goToScreen = (routeName, params, isReset = true) => { const { navigator } = this.refs; + console.log("APP HAS LOADED", global.appHasLoaded); if (global.appHasLoaded) { navigator.dispatch({ type: "Navigation/NAVIGATE", diff --git a/screens/splashscreen/SplashScreen.js b/screens/splashscreen/SplashScreen.js index d18f7479..3ba05531 100644 --- a/screens/splashscreen/SplashScreen.js +++ b/screens/splashscreen/SplashScreen.js @@ -52,27 +52,34 @@ export default class SplashScreen extends Component { } }; workUserResult(result) { - var way = ""; - var way2 = ""; - if (result === null || result === undefined) { - way = "Auth" - way2 = route.first + console.log("SPLASHSCREEN PROPS", this.props); + if (this.props.navigation.state.params.hasOwnProperty('routeName')) { + this.props.navigation.navigate(this.props.navigation.state.params.routeName, { + id: this.props.navigation.state.params.params.id + }); } else { - if (!result.category) - way = "App" - else { - switch (result.category) { - case 'geolocated': way = "AgentApp" - break; - case 'super': way = "adminApp" - break - default: - way = "supAdminApp" + var way = ""; + var way2 = ""; + if (result === null || result === undefined) { + way = "Auth" + way2 = route.first + } else { + if (!result.category) + way = "App" + else { + switch (result.category) { + case 'geolocated': way = "AgentApp" + break; + case 'super': way = "adminApp" + break + default: + way = "supAdminApp" + } } + way2 = route.login } - way2 = route.login + this.props.navigation.navigate(way) } - this.props.navigation.navigate(way) /* Navigation.setStackRoot(route.stackRoot, { component: {