feat: call image picker
This commit is contained in:
parent
56c8df4222
commit
d96270773b
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { ScrollView, TouchableOpacity } from 'react-native';
|
||||
import { Center, Heading, Text, VStack } from '@gluestack-ui/themed';
|
||||
import * as ImagePicker from 'expo-image-picker';
|
||||
|
||||
import { Button } from '@components/Button';
|
||||
import { Input } from '@components/Input';
|
||||
|
|
@ -7,6 +8,10 @@ import { ScreenHeader } from '@components/ScreenHeader';
|
|||
import { UserPhoto } from '@components/UserPhoto';
|
||||
|
||||
export function Profile() {
|
||||
async function handleUserPhotoSelection() {
|
||||
await ImagePicker.launchImageLibraryAsync();
|
||||
}
|
||||
|
||||
return (
|
||||
<VStack flex={1}>
|
||||
<ScreenHeader title="Perfil" />
|
||||
|
|
@ -19,7 +24,7 @@ export function Profile() {
|
|||
size="xl"
|
||||
/>
|
||||
|
||||
<TouchableOpacity>
|
||||
<TouchableOpacity onPress={handleUserPhotoSelection}>
|
||||
<Text color="$green500" fontFamily="$heading" fontSize="$md" mt="$2" mb="$8">
|
||||
Alterar foto
|
||||
</Text>
|
||||
|
|
|
|||
Loading…
Reference in a new issue