diff --git a/src/assets/icons/camera.svg b/src/assets/icons/camera.svg index 627e440..e520f88 100644 --- a/src/assets/icons/camera.svg +++ b/src/assets/icons/camera.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/src/screens/addTrip/AddTripCalendarScreen.tsx b/src/screens/addTrip/AddTripCalendarScreen.tsx index 086e6d1..40dbe58 100644 --- a/src/screens/addTrip/AddTripCalendarScreen.tsx +++ b/src/screens/addTrip/AddTripCalendarScreen.tsx @@ -306,22 +306,22 @@ const AddTripCalendarScreen: React.FC = () => { {/* ==================== 날짜 등록 버튼 ==================== */} - + navigation.navigate('WishlistScreen')} - className="h-[44px] w-[370px] items-center justify-center rounded-[4px]" + className="h-[44px] w-full items-center justify-center rounded-[4px]" style={{ backgroundColor: isButtonEnabled ? COLORS.main : COLORS.buttonDisabledOverlay, borderWidth: 1, @@ -339,4 +339,4 @@ const AddTripCalendarScreen: React.FC = () => { AddTripCalendarScreen.displayName = 'AddTripCalendarScreen'; export default AddTripCalendarScreen; -export { AddTripCalendarScreen }; \ No newline at end of file +export { AddTripCalendarScreen }; diff --git a/src/screens/addTrip/AddTripScreen.tsx b/src/screens/addTrip/AddTripScreen.tsx index e425218..009333e 100644 --- a/src/screens/addTrip/AddTripScreen.tsx +++ b/src/screens/addTrip/AddTripScreen.tsx @@ -1,10 +1,13 @@ import React, { useState } from 'react'; -import { Image, Text, TextInput, TouchableOpacity, View } from 'react-native'; +import { Alert, Image, Text, TextInput, TouchableOpacity, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; import { useNavigation } from '@react-navigation/native'; import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { launchImageLibrary } from 'react-native-image-picker'; +import { TopBar } from '@/components'; import { COLORS } from '@/constants'; +import type { RootStackParamList } from '@/navigation/types'; import { CameraIcon, RightArrowIcon, @@ -17,29 +20,42 @@ type AddTripNavigation = NativeStackNavigationProp { const navigation = useNavigation(); const [tripName, setTripName] = useState(''); + const [selectedImageUri, setSelectedImageUri] = useState(null); + + const handlePickTripImage = async () => { + const result = await launchImageLibrary({ + mediaType: 'photo', + selectionLimit: 1, + quality: 0.9, + }); + + setSelectedImageUri(result.assets?.[0]?.uri ?? null); + }; + return ( - - navigation.goBack()}> - - - 여행지 추가 - + navigation.goBack()} /> - + onPress={handlePickTripImage} + className="absolute bottom-[6px] right-[6px] h-[32px] w-[32px] items-center justify-center rounded-full" + style={{ backgroundColor: '#251D18CC' }}> + @@ -73,4 +89,4 @@ const AddTripScreen: React.FC = () => { AddTripScreen.displayName = 'AddTripScreen'; export default AddTripScreen; -export { AddTripScreen }; \ No newline at end of file +export { AddTripScreen };