import { Image } from 'expo-image' import * as ImagePicker from 'expo-image-picker' import { t } from 'i18next' import { useState, useCallback } from 'react' import { StyleSheet } from 'react-native' import { Box, Text, Button, Row, themeColors } from '@/design-system' export const ProfileEditImage: React.FC = () => { const [image, setImage] = useState(null) const pickImage = useCallback(async () => { const result = await ImagePicker.launchImageLibraryAsync({ mediaTypes: ImagePicker.MediaTypeOptions.Images, allowsEditing: true, aspect: [4, 3], quality: 1, }) if (!result.canceled && result.assets && result.assets.length > 0) { setImage(result.assets[0].uri) } }, []) return ( {t('profile_screen.your_photo')} {t('profile_screen.your_photo_description')} {image ? ( ) : ( {t('profile_screen.photo_innerText')} )} ) } const styles = StyleSheet.create({ container: { alignItems: 'flex-start', flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-between', maxWidth: 800, }, image: { height: '100%', width: '100%', }, imageContainer: { borderRadius: 32, height: 64, marginBottom: 10, marginRight: 82, overflow: 'hidden', width: 64, }, placeholder: { alignItems: 'center', backgroundColor: themeColors.primitives['Gray neutral']['50'], height: '100%', justifyContent: 'center', }, textContainer: { flex: 1, marginBottom: 30, maxWidth: 260, minWidth: 260, }, })