From 1ae66a0aa6532436a5b3c0f4c40023d181bb292e Mon Sep 17 00:00:00 2001 From: Suyash Srivastava <55198615+Spirit2v@users.noreply.github.com> Date: Thu, 10 Feb 2022 18:03:50 +0530 Subject: [PATCH] update --- src/views/Splash.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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 */} {/* */}