-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
54 lines (51 loc) · 2.45 KB
/
main.js
File metadata and controls
54 lines (51 loc) · 2.45 KB
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
import React, { Component } from 'react'
import { View, StyleSheet, Dimensions, Text, TouchableHighlight, AsyncStorage } from 'react-native'
import { FormLabel, FormInput, Button } from 'react-native-elements'
const {width, height} = Dimensions.get('window');
class Home extends Component {
static navigationOptions = {
header: null,
};
_exit = () => {
const { navigate } = this.props.navigation;
AsyncStorage.setItem('login', '0');
AsyncStorage.setItem('password', '0');
AsyncStorage.setItem('id', '0');
navigate('loginPage');
}
render(){
const { navigate } = this.props.navigation;
return (<View style= {styles.container}>
<Text style={styles.head}>Главная</Text>
<View>
<Button title='Загрузить документ' buttonStyle={styles.btnStyle} backgroundColor={'#F89406'} onPress = { () => navigate('uploadPage')}/>
<Button title='Отправить документ' buttonStyle={styles.btnStyle} backgroundColor={'#F89406'} onPress = { () => navigate('sharePage')} />
<Button title='Мои документы' buttonStyle={styles.btnStyle} backgroundColor={'#F89406'} onPress = { () => navigate('docsPage')}/>
<Button title='Выход' buttonStyle={styles.btnStyle} backgroundColor={'#F89406'} onPress = { () => {this._exit()}}/>
</View>
</View>);
}
}
var styles = StyleSheet.create({
container:{
flex: 1,
flexDirection:'column',
alignItems:'center',
justifyContent:'center',
backgroundColor:'white'
},
head:{
fontSize: 25,
marginBottom: 40,
},
btnStyle:{
width:width - 50,
marginTop: 40
},
hrefStyle:{
marginTop: 40,
color: '#03b1f7',
textAlign: 'center'
}
});
export default Home;