-
Notifications
You must be signed in to change notification settings - Fork 2
/
App2.js
73 lines (70 loc) · 2.27 KB
/
App2.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
import * as React from 'react';
import { Text, Image, View, StyleSheet, Alert } from 'react-native';
import { Button, Avatar, Badge, withBadge } from 'react-native-elements';
import Icon from 'react-native-vector-icons/FontAwesome';
export default class App extends React.Component {
render() {
return (
<View>
<View
style={{
backgroundColor: '#f5f5f5',
padding: 140,
alignSelf: 'center'
}}>
<Image source={{uri: 'https://raw.githubusercontent.com/zold-io/zold.github.io/master/images/logo-blue.png'}} style={{width: 128, height: 128, marginBottom: 20}} />
<Text style={{
alignSelf: 'center',
width: 300,
marginBottom: 20
}}>An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments.</Text>
<Button
onPress={this._authGithub}
buttonStyle={{
backgroundColor: "rgb(55,57,55)",
height: 45,
width: 130,
borderColor: "transparent",
borderWidth: 0,
borderRadius: 5
}}
title='Sign-in'
/>
<Text style={{
alignSelf: 'center',
width: 300,
color: '#afafaf',
marginTop: 120
}}>© 2019 0.11.3</Text>
</View>
</View>
);
}
_authGithub = async () => {
try {
console.log("try");
let result = await authGithub();
this.setState({githubToken: result});
} catch(e) {
console.log(e.message);
this.setState({error: JSON.stringify(e)});
}
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
contentContainer: {
padding: 30,
},
button: {
marginTop: 20,
padding: 20,
backgroundColor: '#eee',
},
result: {
marginTop: 20,
},
});