-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelp.js
143 lines (127 loc) · 4.28 KB
/
Help.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import React, { Component } from "react";
import { Image, keyboard, Modal, LogBox, ScrollView, AsyncStorage, Dimensions, StyleSheet, StatusBar, TouchableOpacity } from 'react-native';
import { Container, Header, Title, FooterTab, Footer, Spinner, Textarea, Content, Card, CardItem, Text, Body, View, Fab, Left, Right, Button, Icon, List, ListItem, Thumbnail, Item } from "native-base";
import * as Font from 'expo-font';
import { Ionicons } from '@expo/vector-icons';
import api from './DbConfig';
import { WebView } from 'react-native-webview';
LogBox.ignoreAllLogs();
StatusBar.setBackgroundColor('#0099ff',true);
const {width, height} = Dimensions.get("window");
export default class Help extends Component {
constructor(props) {
super(props)
this.state = {
active: false,
modalVisible:true,
};
}
_retrieveData = async () => {
try{
const useruid = await AsyncStorage.getItem('userid').then((value) => {
this.decision();
});
}
catch(err){
console.log('Profile Page store error: '+err);
}
};
decision=async ()=>{
try{
const useruid = await AsyncStorage.getItem('userid');
if (useruid!==null) {
}
else{
this.props.navigation.replace("Login");
}
}
catch(err){
console.log('Profile Page store error: '+err);
}
}
async componentDidMount() {
this._retrieveData();
await Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
})
this.setState({ loading: false })
}
render() {
return (
<Container>
<Header style={{backgroundColor:'#0099ff'}} androidStatusBarColor='#0099ff'>
<Left>
<Button transparent onPress={()=>{this.props.navigation.goBack()}}>
<Icon name='arrow-back' />
</Button>
</Left>
<Body>
<Title>Help</Title>
</Body>
<Right />
</Header>
<Content>
<View style={{height:(height/2)+150, marginTop:20}}>
<WebView
automaticallyAdjustContentInsets={false}
scrollEnabled={false}
source={{ uri:'https://mail.google.com/mail/u/0/?view=cm&fs=1&[email protected]&su=Contact%20mail%20to%20RoboGYAN&tf=1' }}
onLoadStart={() => this.setState({modalVisible:true})}
onLoad={() => this.setState({modalVisible:false})}/>
</View>
<View style={styles.centeredView}>
<Modal
animationType="slide"
transparent={true}
visible={this.state.modalVisible}
>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<Thumbnail source={require('./assets/faq.gif')}
style={{height:height/4,width:width, resizeMode:'contain'}}
/>
<Text note style={{fontSize:20}}>Loading</Text>
</View>
</View>
</Modal>
</View>
</Content>
</Container>
);
}
}
const styles = StyleSheet.create({
centeredView: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
modalView: {
margin: 20,
backgroundColor: 'white',
borderRadius: 10,
width:(width/2)+50,
justifyContent:'center',
height:height/3,
alignItems: 'center',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
},
textStyle: {
color: 'white',
fontWeight: 'bold',
textAlign: 'center',
},
modalText: {
marginBottom: 15,
textAlign: 'center',
},
});