From 51d9df40bf5827c6dde07cbad273c169a81b2b24 Mon Sep 17 00:00:00 2001 From: sjsjmine129 Date: Sat, 1 Jun 2024 21:11:42 +0900 Subject: [PATCH 1/4] Fix/ --- src/assets/svg.js | 6 ++ src/screens/detail/ReviewWriteScreen.js | 84 ++++++++++--------------- 2 files changed, 39 insertions(+), 51 deletions(-) diff --git a/src/assets/svg.js b/src/assets/svg.js index f4d1ac1..1315ece 100644 --- a/src/assets/svg.js +++ b/src/assets/svg.js @@ -312,6 +312,12 @@ export const svgXml = { `, + reviewCamera: ` + + + + + `, phone: ` diff --git a/src/screens/detail/ReviewWriteScreen.js b/src/screens/detail/ReviewWriteScreen.js index d52ddf8..3f2a73a 100644 --- a/src/screens/detail/ReviewWriteScreen.js +++ b/src/screens/detail/ReviewWriteScreen.js @@ -57,7 +57,7 @@ export default function ReviewWriteScreen(props) { const [showRatingError, setShowRatingError] = useState(false); const [showContentError, setShowContentError] = useState(false); const [showImageError, setShowImageError] = useState(false); - const [reviewImage, setReviewImage] = useState([]); + const [reviewImage, setReviewImage] = useState(''); console.log('storeData:', 2); @@ -76,7 +76,7 @@ export default function ReviewWriteScreen(props) { `${API_URL}/v1/restaurants/${storeData.id}/reviews`, { content: reviewContent, - imageUrls: reviewImage, + imageUrls: [reviewImage], rating: rating, }, { @@ -122,10 +122,7 @@ export default function ReviewWriteScreen(props) { console.log('response image:', response.data); if (response.data.result === 'SUCCESS') { - setReviewImage(prevImages => [ - ...prevImages, - response.data.data[0].imageUrl, - ]); + setReviewImage(response.data.data[0].imageUrl); break; } count += 1; @@ -139,20 +136,6 @@ export default function ReviewWriteScreen(props) { } }; - const removeImage = index => { - setReviewImage(prevImages => prevImages.filter((_, i) => i !== index)); - }; - - const DottedLine = () => { - return ( - - {[...Array(20)].map((_, index) => ( - - ))} - - ); - }; - return ( <>
@@ -189,10 +172,10 @@ export default function ReviewWriteScreen(props) { style={styles.photoButton} onPress={() => { console.log('리뷰 사진 추가', reviewImage); - if (reviewImage.length >= 3) { - console.log('Error: Maximum 3 images allowed'); - return; - } + // if (reviewImage.) { + // console.log('Error: Maximum 3 images allowed'); + // return; + // } ImagePicker.openPicker({ width: 400, height: 400, @@ -206,8 +189,18 @@ export default function ReviewWriteScreen(props) { console.error('Image Picker Error:', error); }); }}> - - 사진 첨부하기 + {reviewImage ? ( + + + setReviewImage('')}> + X + + + ) : ( + + )} {showImageError && ( 사진은 최대 3개만 넣어주세요 @@ -225,22 +218,7 @@ export default function ReviewWriteScreen(props) { {showContentError && ( 리뷰 내용을 작성해주세요 )} - - - - {reviewImage.map((image, index) => ( - - - removeImage(index)}> - X - - - ))} - - - + @@ -267,8 +245,10 @@ const styles = StyleSheet.create({ marginVertical: 20, }, Container: { - width: '100%', + // width: '100%', marginHorizontal: 16, + justifyContent: 'center', + alignItems: 'center', }, storeName: { fontSize: 22, @@ -282,14 +262,15 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', - backgroundColor: COLOR_WHITE, + backgroundColor: COLOR_GRAY, borderColor: COLOR_PRIMARY, borderWidth: 1, padding: 12, borderRadius: 8, marginTop: 6, - marginBottom: 16, - width: '92%', + marginBottom: 0, + width: 130, + height: 130, }, photoButtonText: { color: COLOR_PRIMARY, @@ -305,12 +286,12 @@ const styles = StyleSheet.create({ }, imageWrapper: { position: 'relative', - marginRight: 8, + // marginRight: 8, }, image: { - width: 120, - height: 120, - borderRadius: 10, + width: 130, + height: 130, + borderRadius: 8, }, removeButton: { position: 'absolute', @@ -330,7 +311,8 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 8, padding: 12, - width: '92%', + // width: '92%', + // marginHorizontal: 16, height: 160, textAlignVertical: 'top', marginVertical: 16, From 076a63b7cf6e9d52e8c43328e3a1eb607cc634f4 Mon Sep 17 00:00:00 2001 From: sjsjmine129 Date: Sat, 1 Jun 2024 21:31:01 +0900 Subject: [PATCH 2/4] Fix/reviewWrite --- src/assets/svg.js | 12 ++++++------ src/screens/detail/ReviewWriteScreen.js | 12 ++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/assets/svg.js b/src/assets/svg.js index 1315ece..d925661 100644 --- a/src/assets/svg.js +++ b/src/assets/svg.js @@ -137,14 +137,14 @@ export const svgXml = {
`, starFill: ` - - - + + + `, starEmpty: ` - - - + + + `, shop: ` diff --git a/src/screens/detail/ReviewWriteScreen.js b/src/screens/detail/ReviewWriteScreen.js index 3f2a73a..46071f5 100644 --- a/src/screens/detail/ReviewWriteScreen.js +++ b/src/screens/detail/ReviewWriteScreen.js @@ -17,6 +17,7 @@ import { TextInput, FlatList, Pressable, + TouchableWithoutFeedback, Alert, } from 'react-native'; import { @@ -141,10 +142,12 @@ export default function ReviewWriteScreen(props) {
- {storeData.name} + + {storeData.name} + {[...Array(5)].map((_, index) => ( - { setRating(index + 1); @@ -158,9 +161,9 @@ export default function ReviewWriteScreen(props) { } width="24" height="24" - style={{marginLeft: 7}} + style={{marginLeft: 2}} /> - + ))} @@ -254,6 +257,7 @@ const styles = StyleSheet.create({ fontSize: 22, fontWeight: 'bold', color: COLOR_TEXT_BLACK, + maxWidth: (windowWidth * 3) / 5, }, starContainer: { flexDirection: 'row', From 596c8d88917749d24542fe74d473dd8ee8310184 Mon Sep 17 00:00:00 2001 From: sjsjmine129 Date: Sat, 1 Jun 2024 21:39:58 +0900 Subject: [PATCH 3/4] Fix/UI --- src/components/StoreCompo.js | 14 +++++++++++++- src/components/TodayPick.js | 7 ++++++- src/screens/detail/ReviewWriteScreen.js | 13 ++++++++----- src/screens/mypage/MypageScreen.js | 23 +++++++++++++---------- 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/src/components/StoreCompo.js b/src/components/StoreCompo.js index 552f27b..7a56368 100644 --- a/src/components/StoreCompo.js +++ b/src/components/StoreCompo.js @@ -44,7 +44,7 @@ export default function StoreCompo(props) { const scrollViewRef = useRef(); - const {storeData, index, addPadding} = props; + const {storeData, index, addPadding, fade} = props; console.log('storeData', storeData); return ( @@ -86,6 +86,18 @@ export default function StoreCompo(props) { uri: storeData.representativeImageUrl, }} /> + + {fade ? ( + + ) : null} {todaysPick.map((pickData, index) => { return ( - + ); })} diff --git a/src/screens/detail/ReviewWriteScreen.js b/src/screens/detail/ReviewWriteScreen.js index 46071f5..99f718e 100644 --- a/src/screens/detail/ReviewWriteScreen.js +++ b/src/screens/detail/ReviewWriteScreen.js @@ -255,7 +255,8 @@ const styles = StyleSheet.create({ }, storeName: { fontSize: 22, - fontWeight: 'bold', + // fontWeight: 'bold', + fontFamily: 'NIXGONFONTS M 2.0', color: COLOR_TEXT_BLACK, maxWidth: (windowWidth * 3) / 5, }, @@ -266,9 +267,9 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', - backgroundColor: COLOR_GRAY, - borderColor: COLOR_PRIMARY, - borderWidth: 1, + backgroundColor: COLOR_LIGHTGRAY, + // borderColor: COLOR_PRIMARY, + // borderWidth: 1, padding: 12, borderRadius: 8, marginTop: 6, @@ -315,6 +316,7 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 8, padding: 12, + fontFamily: 'NanumSquareRoundB', // width: '92%', // marginHorizontal: 16, height: 160, @@ -353,7 +355,8 @@ const styles = StyleSheet.create({ }, submitButtonText: { color: COLOR_WHITE, + fontFamily: 'NanumSquareRoundEB', fontSize: 18, - fontWeight: '600', + // fontWeight: '600', }, }); diff --git a/src/screens/mypage/MypageScreen.js b/src/screens/mypage/MypageScreen.js index 9b0f375..0b01612 100644 --- a/src/screens/mypage/MypageScreen.js +++ b/src/screens/mypage/MypageScreen.js @@ -163,18 +163,16 @@ export default function MyPageScreen() { {profileImageUrl != '' ? ( ) : ( - - - + )} Date: Sat, 1 Jun 2024 22:02:44 +0900 Subject: [PATCH 4/4] Fix/color --- src/components/HeaderWhite.js | 2 +- src/components/LongPrimaryButton.js | 28 ++++++++++++++++------- src/screens/signup/CheckEmailScreen.js | 8 ++++--- src/screens/signup/CheckEmailScreen2.js | 3 ++- src/screens/signup/FindPasswordScreen.js | 8 ++++--- src/screens/signup/LoginScreen.js | 22 ++++++++++-------- src/screens/signup/ProfileSetScreen.js | 5 ++-- src/screens/signup/ResetPasswordScreen.js | 8 ++++--- src/screens/signup/SignupScreen.js | 22 +++++++++++++----- 9 files changed, 70 insertions(+), 36 deletions(-) diff --git a/src/components/HeaderWhite.js b/src/components/HeaderWhite.js index a668120..93d0654 100644 --- a/src/components/HeaderWhite.js +++ b/src/components/HeaderWhite.js @@ -40,7 +40,7 @@ export default function HeaderWhite(props) { ) : null} - {text} + onPress={() => { + if (disable) return; + action(); + }} + style={[ + styles.buttonTest, + disable + ? {backgroundColor: COLOR_PRIMARY} + : {backgroundColor: COLOR_PRIMARY}, + ]} + // disabled={disable} + > + + {text} + ); } const styles = StyleSheet.create({ buttonTest: { - backgroundColor: COLOR_PRIMARY, + // backgroundColor: COLOR_PRIMARY, padding: 16, - borderRadius: 5, + borderRadius: 10, justifyContent: 'center', alignItems: 'center', width: '90%', @@ -28,8 +39,9 @@ const styles = StyleSheet.create({ buttonText: { fontSize: 14, color: COLOR_WHITE, - fontWeight: 'normal', + // fontWeight: 'normal', alignSelf: 'center', + fontFamily: 'NanumSquareRoundEB', }, textDisabled: { color: COLOR_WHITE, diff --git a/src/screens/signup/CheckEmailScreen.js b/src/screens/signup/CheckEmailScreen.js index e322944..5a94848 100644 --- a/src/screens/signup/CheckEmailScreen.js +++ b/src/screens/signup/CheckEmailScreen.js @@ -19,6 +19,7 @@ import { COLOR_WHITE, COLOR_BACKGROUND, COLOR_GRAY, + COLOR_HOME_BACKGROUND, COLOR_PRIMARY, COLOR_TEXT70GRAY, COLOR_SECONDARY, @@ -163,11 +164,12 @@ const styles = StyleSheet.create({ justifyContent: 'center', }, samllText: { - color: COLOR_TEXT70GRAY, + color: COLOR_PRIMARY, fontSize: 14, textAlign: 'center', paddingVertical: 4, - fontWeight: 'bold', + // fontWeight: 'bold', + fontFamily: 'NanumSquareRoundB', marginBottom: 8, }, textinputBox: { @@ -176,7 +178,7 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 5, paddingHorizontal: 15, - backgroundColor: '#F8F8F8', + backgroundColor: COLOR_HOME_BACKGROUND, fontSize: 16, width: '100%', }, diff --git a/src/screens/signup/CheckEmailScreen2.js b/src/screens/signup/CheckEmailScreen2.js index 1665f87..3c3147b 100644 --- a/src/screens/signup/CheckEmailScreen2.js +++ b/src/screens/signup/CheckEmailScreen2.js @@ -18,6 +18,7 @@ import { import { COLOR_WHITE, COLOR_BACKGROUND, + COLOR_HOME_BACKGROUND, COLOR_GRAY, COLOR_PRIMARY, COLOR_TEXT70GRAY, @@ -160,7 +161,7 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 5, paddingHorizontal: 15, - backgroundColor: '#F8F8F8', + backgroundColor: COLOR_HOME_BACKGROUND, fontSize: 16, width: '100%', }, diff --git a/src/screens/signup/FindPasswordScreen.js b/src/screens/signup/FindPasswordScreen.js index aa3bde4..39e41ca 100644 --- a/src/screens/signup/FindPasswordScreen.js +++ b/src/screens/signup/FindPasswordScreen.js @@ -17,6 +17,7 @@ import { } from 'react-native'; import { COLOR_WHITE, + COLOR_HOME_BACKGROUND, COLOR_BACKGROUND, COLOR_GRAY, COLOR_PRIMARY, @@ -123,11 +124,12 @@ const styles = StyleSheet.create({ justifyContent: 'center', }, samllText: { - color: COLOR_TEXT70GRAY, + color: COLOR_PRIMARY, fontSize: 14, textAlign: 'center', paddingVertical: 4, - fontWeight: 'bold', + // fontWeight: 'bold', + fontFamily: 'NanumSquareRoundB', marginBottom: 8, }, textinputBox: { @@ -136,7 +138,7 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 5, paddingHorizontal: 15, - backgroundColor: '#F8F8F8', + backgroundColor: COLOR_HOME_BACKGROUND, fontSize: 16, width: '100%', }, diff --git a/src/screens/signup/LoginScreen.js b/src/screens/signup/LoginScreen.js index 064aa74..e973019 100644 --- a/src/screens/signup/LoginScreen.js +++ b/src/screens/signup/LoginScreen.js @@ -22,6 +22,8 @@ import { COLOR_PRIMARY, COLOR_TEXT70GRAY, COLOR_SECONDARY, + COLOR_LIGHTGRAY, + COLOR_HOME_BACKGROUND, } from '../../assets/color'; import AnimatedButton from '../../components/AnimationButton'; import {useNavigation} from '@react-navigation/native'; @@ -124,7 +126,7 @@ export default function LoginScreen() { }} value={email} style={styles.textinputBox} - placeholder='' + placeholder="" /> @@ -161,10 +163,10 @@ export default function LoginScreen() { - - + - + {'가입하시면 이용약관 및 개인정보 보호정책에'} - + {'자동으로 동의하게 됩니다.'} @@ -275,12 +276,21 @@ const styles = StyleSheet.create({ justifyContent: 'center', }, samllText: { - color: COLOR_TEXT70GRAY, + color: COLOR_PRIMARY, fontSize: 14, textAlign: 'center', paddingVertical: 4, - fontWeight: 'bold', + // fontWeight: 'bold', + fontFamily: 'NanumSquareRoundB', + marginBottom: 8, + }, + samllText2: { + color: COLOR_TEXT70GRAY, + fontSize: 14, + textAlign: 'center', marginBottom: 8, + // fontWeight: 'bold', + fontFamily: 'NanumSquareRoundB', }, textinputBox: { height: 50, @@ -288,7 +298,7 @@ const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 5, paddingHorizontal: 15, - backgroundColor: '#F8F8F8', + backgroundColor: COLOR_HOME_BACKGROUND, fontSize: 16, width: '100%', },