Suyash Srivastava пре 3 година
родитељ
комит
1ae66a0aa6
1 измењених фајлова са 15 додато и 15 уклоњено
  1. +15
    -15
      src/views/Splash.js

+ 15
- 15
src/views/Splash.js Прегледај датотеку

@@ -29,33 +29,33 @@ class Splash extends Component<Props> {
}
}
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<Props> {
};

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<Props> {
<Image
source={pana}
// resizeMethod ='resize'
style={{ height: windowHeight/4-32, width:windowWidth-52 }}
style={{ height: windowHeight/4-32, width:windowWidth-62 ,marginRight:"5%"}}
/>
{/* <Text style={styles.spl_style2}>Desi Health Service</Text> */}
{/* <View style={styles.spl_style3} /> */}


Loading…
Откажи
Сачувај