|
@@ -1,18 +1,80 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
|
-import {useState} from "react";
|
3
|
|
-import { StyleSheet, View, Text } from 'react-native';
|
4
|
|
-import Header from '../shared/header';
|
5
|
|
-
|
6
|
|
-export default function Account({navigation}) {
|
7
|
|
- return (
|
8
|
|
- <View style={styles.container}>
|
9
|
|
- <Text>Account Screen</Text>
|
10
|
|
- </View>
|
11
|
|
- )
|
12
|
|
-}
|
13
|
|
-
|
14
|
|
-const styles = StyleSheet.create({
|
15
|
|
- container: {
|
16
|
|
- padding: 24
|
17
|
|
- }
|
18
|
|
-});
|
|
2
|
+import { Alert, View, Linking} from 'react-native';
|
|
3
|
+import { Button, Text, TextInput, Divider } from 'react-native-paper';
|
|
4
|
+import { useCallback } from "react";
|
|
5
|
+import { createStackNavigator, createAppContainer } from 'react-navigation';
|
|
6
|
+
|
|
7
|
+const supportedURL = "https://docs.google.com/forms/d/e/1FAIpQLSe93-cuCFQ084AxVbzhwFJHjtPhrXFJ624ezAcqKU5qUsBqwg/viewform";
|
|
8
|
+
|
|
9
|
+const OpenURLButton = ({ url, children }) => {
|
|
10
|
+ const handlePress = useCallback(async () => {
|
|
11
|
+ // Checking if the link is supported for links with custom URL scheme.
|
|
12
|
+ const supported = await Linking.canOpenURL(url);
|
|
13
|
+
|
|
14
|
+ if (supported) {
|
|
15
|
+ // Opening the link with some app, if the URL scheme is "http" the web link should be opened
|
|
16
|
+ // by some browser in the mobile
|
|
17
|
+ await Linking.openURL(url);
|
|
18
|
+ } else {
|
|
19
|
+ Alert.alert(`Don't know how to open this URL: ${url}`);
|
|
20
|
+ }
|
|
21
|
+ }, [url]);
|
|
22
|
+
|
|
23
|
+ return <Button buttonColor = "purple"
|
|
24
|
+ textColor= "white"
|
|
25
|
+ style={{width: 250, marginVertical: 40, marginHorizontal: 90}}
|
|
26
|
+ onPress={handlePress}>
|
|
27
|
+ Llenar formulario de voluntario
|
|
28
|
+ </Button> ;
|
|
29
|
+ };
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+const MyComponent = () => {
|
|
33
|
+ const [text, setText] = React.useState("");
|
|
34
|
+ const [text2, setText2] = React.useState("");
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+ return (
|
|
38
|
+ <View >
|
|
39
|
+
|
|
40
|
+ <Text style={{fontSize:30, fontWeight:"bold", marginVertical: 20, marginHorizontal: 110}}>
|
|
41
|
+ Crear Cuenta
|
|
42
|
+ </Text>
|
|
43
|
+
|
|
44
|
+ <TextInput style={{width: 350, marginVertical: 40, marginHorizontal: 30}}
|
|
45
|
+ label="Nombre"
|
|
46
|
+ value={text}
|
|
47
|
+ mode = "outlined"
|
|
48
|
+ outlineColor='#327ABC'
|
|
49
|
+ onChangeText={text => setText(text)}
|
|
50
|
+ />
|
|
51
|
+
|
|
52
|
+ <TextInput style={{width: 350, marginVertical: -20, marginHorizontal: 30}}
|
|
53
|
+ label="Email"
|
|
54
|
+ value={text2}
|
|
55
|
+ mode = "outlined"
|
|
56
|
+ outlineColor='#327ABC'
|
|
57
|
+ onChangeText={text2 => setText2(text2)}
|
|
58
|
+ />
|
|
59
|
+
|
|
60
|
+ <Button style={{width: 250, marginVertical: 70, marginHorizontal: 90}}
|
|
61
|
+ buttonColor = "#327ABC"
|
|
62
|
+ mode="contained"
|
|
63
|
+ onPress={console.log(text)}>
|
|
64
|
+ Crear cuenta
|
|
65
|
+ </Button>
|
|
66
|
+ <Divider style={{marginVertical: -20}}
|
|
67
|
+ horizontalInset='true' />
|
|
68
|
+
|
|
69
|
+ <Button style={{width: 250, marginVertical: 70, marginHorizontal: 90}}
|
|
70
|
+ buttonColor = "teal"
|
|
71
|
+ mode="contained" >
|
|
72
|
+ Crear cuenta con Google
|
|
73
|
+ </Button>
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+ </View>
|
|
77
|
+ );
|
|
78
|
+};
|
|
79
|
+
|
|
80
|
+export default MyComponent;
|