diff --git a/src/views/Splash.js b/src/views/Splash.js index ffa5bd95..a81b1d49 100644 --- a/src/views/Splash.js +++ b/src/views/Splash.js @@ -29,33 +29,33 @@ class Splash extends Component { } } async componentDidMount() { - await this.checkToken2(); + // await this.checkToken2(); // this.video(); setTimeout(async() => { await this.checkToken(); - + await this.settings(); + await this.home(); }, 2000); - await this.settings(); - await this.home(); + } video=()=>{ this.props.navigation.navigate("VideoCall") } - checkToken2 = async () => { - //get the messeging token - let fcmToken = await AsyncStorage.getItem("fcmToken"); - this.setState({ - toke:fcmToken - }) - } + // checkToken2 = async () => { + // //get the messeging token + // let fcmToken = await AsyncStorage.getItem("fcmToken"); + // this.setState({ + // toke:fcmToken + // }) + // } checkToken = async () => { //get the messeging token - const fcmToken = await AsyncStorage.getItem("fcmToken"); + let fcmToken = await AsyncStorage.getItem("fcmToken"); // let fcmToken = await AsyncStorage.getItem("fcmToken"); - if (!this.state.toke) { + if (!fcmToken) { this.props.navigation.dispatch( CommonActions.reset({ index: 0, @@ -200,7 +200,7 @@ class Splash extends Component { }; render() { - let fcmToken = AsyncStorage.getItem("fcmToken"); + const windowWidth = Dimensions.get('window').width; const windowHeight = Dimensions.get('window').height; return ( @@ -223,7 +223,7 @@ class Splash extends Component { {/* Desi Health Service */} {/* */}