-
Notifications
You must be signed in to change notification settings - Fork 1
/
LogoutScreen.js
42 lines (36 loc) · 995 Bytes
/
LogoutScreen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React, {Component} from 'react';
import {StyleSheet,View, Text, TouchableOpacity, KeyboardAvoidingView} from 'react-native';
export default class LogOutScreen extends Component<{}>{
static navigationOptions = {
title : 'Logged Out'
};
componentDidMount(){
const{navigate} = this.props.navigation;
this.timeoutHandle = setTimeout(()=>{
navigate("Home",{})
}, 2000);
}
componentWillUnmount(){
clearTimeout(this.timeoutHandle);
}
render(){
const{navigate} = this.props.navigation;
return (
<KeyboardAvoidingView behavior="padding" style={style.container}>
<Text style={style.buttontext}>Sucessfully Logged Out!</Text>
</KeyboardAvoidingView>
);
}
}
const style = StyleSheet.create({
container : {
flex: 1,
backgroundColor: '#3498db',
alignItems: 'center'
},
buttontext : {
textAlign: 'center',
color: '#ffffff',
fontWeight: '700'
}
});