|
|
|
@ -1,10 +1,25 @@
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Button, Pressable } from 'react-native';
|
|
|
|
|
import { StyleSheet, Text, View, Image, TextInput } from 'react-native';
|
|
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
|
|
import * as DocumentPicker from 'expo-document-picker';
|
|
|
|
|
|
|
|
|
|
export default function CreateTeam(props: { navigation: any }) {
|
|
|
|
|
const { navigation } = props;
|
|
|
|
|
|
|
|
|
|
const [pickedDocument, setPickedDocument] = useState<DocumentPicker.DocumentResult | null>(null);
|
|
|
|
|
|
|
|
|
|
const handlePickDocument = async () => {
|
|
|
|
|
try {
|
|
|
|
|
const result = await DocumentPicker.getDocumentAsync({ type: ['image/png', 'image/jpeg', 'image/jpg'] });
|
|
|
|
|
if (result.type === 'success') {
|
|
|
|
|
setPickedDocument(result);
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<SafeAreaView style={styles.container}>
|
|
|
|
|
<View style={styles.maincard}>
|
|
|
|
@ -15,11 +30,11 @@ export default function CreateTeam(props: { navigation: any }) {
|
|
|
|
|
style={styles.logo}
|
|
|
|
|
source={require('../assets/images/image.png')}
|
|
|
|
|
/>
|
|
|
|
|
<Pressable>
|
|
|
|
|
<Image
|
|
|
|
|
style={styles.import}
|
|
|
|
|
source={require('../assets/images/import.png')}
|
|
|
|
|
/>
|
|
|
|
|
<Pressable onPress={handlePickDocument}>
|
|
|
|
|
<Image style={styles.import} source={require('../assets/images/import.png')} />
|
|
|
|
|
<Text>
|
|
|
|
|
Picked document: {pickedDocument ? pickedDocument.name : 'none'}
|
|
|
|
|
</Text>
|
|
|
|
|
</Pressable>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|