|
|
@ -1,4 +1,4 @@ |
|
|
|
import React, { useEffect, useState } from "react"; |
|
|
|
import React, { useEffect, useState } from "react"; |
|
|
|
import { |
|
|
|
View, |
|
|
|
StyleSheet, |
|
|
@ -20,7 +20,7 @@ function ImageInput({ imageUri, onChangeImage }) { |
|
|
|
//requestPermissionCamera();
|
|
|
|
}, []); |
|
|
|
|
|
|
|
/* const requestPermissionCamera = async () => { |
|
|
|
/* const requestPermissionCamera = async () => { |
|
|
|
const { granted } = await Permissions.askAsync(Permissions.CAMERA); |
|
|
|
if(granted) { |
|
|
|
launchCamera(); |
|
|
@ -42,7 +42,8 @@ function ImageInput({ imageUri, onChangeImage }) { |
|
|
|
|
|
|
|
const requestPermission = async () => { |
|
|
|
const { granted } = await ImagePicker.requestCameraRollPermissionsAsync(); |
|
|
|
if (!granted) alert("Você precisa habilitar permissão para acessar a biblioteca."); |
|
|
|
if (!granted) |
|
|
|
alert("Você precisa habilitar permissão para acessar a biblioteca."); |
|
|
|
}; |
|
|
|
|
|
|
|
const handlePress = () => { |
|
|
@ -77,7 +78,9 @@ function ImageInput({ imageUri, onChangeImage }) { |
|
|
|
size={40} |
|
|
|
/> |
|
|
|
)} |
|
|
|
{imageUri && <Image source={{ uri: imageUri }} style={styles.image} />} |
|
|
|
{imageUri && ( |
|
|
|
<Image source={{ uri: imageUri }} style={styles.image} /> |
|
|
|
)} |
|
|
|
</View> |
|
|
|
</TouchableWithoutFeedback> |
|
|
|
</View> |
|
|
@ -101,17 +104,17 @@ const styles = StyleSheet.create({ |
|
|
|
}, |
|
|
|
centeredView: { |
|
|
|
flex: 1, |
|
|
|
justifyContent: 'center', |
|
|
|
alignItems: 'center', |
|
|
|
justifyContent: "center", |
|
|
|
alignItems: "center", |
|
|
|
marginTop: 22, |
|
|
|
}, |
|
|
|
modalView: { |
|
|
|
margin: 20, |
|
|
|
backgroundColor: '#d3d3d3', |
|
|
|
backgroundColor: colors.lightGray, |
|
|
|
borderRadius: 20, |
|
|
|
padding: 30, |
|
|
|
alignItems: 'center', |
|
|
|
shadowColor: 'grey', |
|
|
|
alignItems: "center", |
|
|
|
shadowColor: "grey", |
|
|
|
shadowOffset: { |
|
|
|
width: 10, |
|
|
|
height: 2, |
|
|
@ -123,7 +126,7 @@ const styles = StyleSheet.create({ |
|
|
|
}, |
|
|
|
modalText: { |
|
|
|
marginTop: 15, |
|
|
|
textAlign: 'center', |
|
|
|
textAlign: "center", |
|
|
|
fontSize: 16, |
|
|
|
color: colors.primary, |
|
|
|
}, |
|
|
@ -135,7 +138,7 @@ const styles = StyleSheet.create({ |
|
|
|
fontSize: 18, |
|
|
|
textAlign: "center", |
|
|
|
fontWeight: "bold", |
|
|
|
height: 35 |
|
|
|
height: 35, |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|