From d5febb2c22fcea46be4950789b8f14ae3b3f4a61 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 02:49:46 +0900 Subject: [PATCH 01/11] =?UTF-8?q?fix:=20QA=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=85=9D=20=EB=A9=94=EC=9D=B8=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EA=B3=BC=20=EC=B2=B4=ED=81=AC=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=ED=95=80=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/images/checkList/pinnedCheckList.png | Bin 0 -> 754 bytes assets/images/checkList/unPinnedCheckList.png | Bin 0 -> 987 bytes .../CheckListSummaryComponenet.tsx | 89 ++++++++++++++++++ .../myItem/MyItemElement.tsx | 2 - components/CheckListComponent/styles.tsx | 25 +++++ components/Home/CheckListHome.tsx | 12 ++- components/Home/PinnedCheckList.tsx | 1 - .../BasicInfoOfBasicCheckList.tsx | 48 +++++----- .../BasicCheckList/MyItemOfBasicCheckList.tsx | 1 + screens/bottomTab/Home.tsx | 16 +++- 10 files changed, 163 insertions(+), 31 deletions(-) create mode 100644 assets/images/checkList/pinnedCheckList.png create mode 100644 assets/images/checkList/unPinnedCheckList.png create mode 100644 components/CheckListComponent/CheckListSummaryComponenet.tsx diff --git a/assets/images/checkList/pinnedCheckList.png b/assets/images/checkList/pinnedCheckList.png new file mode 100644 index 0000000000000000000000000000000000000000..5e2f04b80898d1025214cf2d7074be03d494dcba GIT binary patch literal 754 zcmVHpVQ;EY3{j zpPS4KW;(Mnv!bFXO_^~OHwQ)xqD5wDflvk-vn?jXAU^{5j5Ev@=w`?>%Q{6waUjR6 zx0od;7$6E6yJ$pg$ddt+1DH^jkKF~uLLT(Yt+*BmMIgtT=RzbGMJ$>*Aud72FL|Z% zW59!ZoO98Y03Lc@*}k{;Rb5~I@GO_xed^)21j}6OSTLTS(z+ zze_#{N!F zd`w{ykr;!3q>B@sp8kz&Zfc2xgP((~*8d1eKvF~!gT=`Og+l2u+iI#TxhP_P|NCGM zmpCHedct8A^?D;(Dt&uMl9-ztuMZE${*8`4|I@=w#V#n5BsMk*2^kR}UtX5l37tA1 z)i?mFtMk>#$&nKZh#cGyU{FBtNDdefpv!ujOE57pa$*;WnVA>A$s2SeA#xz?<|&e| zt<6_2-xkQsiT?ik=dswMGxCNqB2XlkJg_J4&WWk1RL|USK(PMx%94 z*Q*0oa#2Jo^`$jC`_gOpHE?$t5`Hv(bn>j#j-x)p>xS3pj5?K#w@7&>&k)G-W?Lqf z)-1Csg%5*sQI`PTqpgH2!fZ;L*9348aCjGz2#o#KdN;WBi^<)*npuP(8psXTYAFC@ ks4ee(Urud=gmOK<0IHoJW^3jS_5c6?07*qoM6N<$f+aOcivR!s literal 0 HcmV?d00001 diff --git a/assets/images/checkList/unPinnedCheckList.png b/assets/images/checkList/unPinnedCheckList.png new file mode 100644 index 0000000000000000000000000000000000000000..1d1ea1b99016964bd1d858f24d4ceb4adb170a0b GIT binary patch literal 987 zcmV<110?*3P)%o`h>ydktc$mjEc;le>!uGLU9pRWem zdaO6YUwNzAJ<;?4?D=Tnpj%G>tIdE$zzqaXr4%RsXe|o9V0ZYo?DP`yB~NN4WM}Z>trHvHsSTUYIAdP z*^UvSh?jv)91agluLiO!D|~(Z)%Dbr_wW9G;sF=|{gKFvT(9>jrS;TKDAmIp8M&!! zwm^=K&c>6;?_Mh$`c_t6{(>v75xS1Tguw&-pw+4-?CpK_r_;Zknx@s`rWJ0=juC=@ z0|aBtP5?!{ba;3=&W@T3+TrlCo9Stv77RWvJDrZUy~}2cTWEwF$D_2;2R6ETJ zYyx|M`X~|!pPmPo<)X;qcR9r*Qz^-j2)pe3>jPJkQCpPwNH;0h=IBnXUyR z;JUiHkm&_qS_=K)nHRR8z~hBpMhprEw!q*DvLQCUeq>HhFYZHNLOYeZlI+48b1B3y z=s83q&kFzqa4=5+LgjTq@6;>l04q~(($$k<= zF)65O`2hA}5ID3=Z_Lj>;VMF{g5s4xt(MCbV}c-b{2D?MN~bfb1 z2cj4YS7`K7YBecp-n0~@loh2as|$@$)rG7ml{U=PgYJ~&jgI#t@`S?XeP@M(y8M_7 z-4ksqHzjl$4FlO3ecLNAc?AKdY0_FJIEdrtl**b`-el>TyKaQUrt35|HYR=O2Ie-v zR3-y8oVuv%dKhCG5Cl;+zoGy%3|(R0sdGr}s_J6D=a?%q{sT { + axios + .put(`api/check-list/main`, { checkListId: checkListContext?.checkListId, pinned: !pin }) + .then(() => setPin(!pin)) + .catch((e) => console.error(e)); + }; + return ( + <> + + + + + + + + + {checkListSummary.title + ? checkListSummary.title.length > 20 + ? `${checkListSummary.title.slice(0, 20)}...` + : checkListSummary.title + : '체크리스트 이름을 정해주세요!'} + + + {checkListSummary.address + ? checkListSummary.address.length > 20 + ? `${checkListSummary.address.slice(0, 20)}...` + : checkListSummary.address + : '해당 매물 위치를 입력해주세요!'} + + + + {checkListSummary.address} + {checkListSummary.roomType && checkListSummary.area && checkListSummary.form ? ( + + + + {checkListSummary.roomType} / {checkListSummary.area} / {checkListSummary.form} + + + ) : null} + {checkListSummary.distance ? ( + + + + {checkListSummary.distance} + + + ) : null} + + + + + ); +} +export default CheckListSummaryComponenet; diff --git a/components/CheckListComponent/myItem/MyItemElement.tsx b/components/CheckListComponent/myItem/MyItemElement.tsx index 638a15b..64959d2 100644 --- a/components/CheckListComponent/myItem/MyItemElement.tsx +++ b/components/CheckListComponent/myItem/MyItemElement.tsx @@ -18,8 +18,6 @@ interface IProps { } function MyItemElement({ myItemElement, elementClickedHandler, myItem, isEdit }: IProps) { - const checkListContext = useContext(checkListCtx); - const myItemElementOnPressHandler = () => { isEdit && elementClickedHandler({ myItem, myItemElement }); }; diff --git a/components/CheckListComponent/styles.tsx b/components/CheckListComponent/styles.tsx index 76db312..c66421b 100644 --- a/components/CheckListComponent/styles.tsx +++ b/components/CheckListComponent/styles.tsx @@ -4,6 +4,31 @@ import { mainBlue, mainLightBlue, mainOrange } from '../../color'; const windowWidth = Dimensions.get('window').width; const styles = StyleSheet.create({ + summaryPinImg: { position: 'absolute', zIndex: 1000, top: 30, right: 15 }, + summaryMainImg: { width: windowWidth - 34, height: 260, borderRadius: 10, marginTop: 15 }, + summaryContentImg: { marginRight: 5 }, + distanceImg: { marginRight: 9 }, + summaryRightContents: { flexDirection: 'row' }, + summaryWrapper: { justifyContent: 'center', alignItems: 'center' }, + summaryContentAddress: { color: '#8C8CA1' }, + summaryContentTitle: { fontSize: 18 }, + summaryWhiteCardWrapper: { + position: 'relative', + marginBottom: -30, + backgroundColor: 'white', + width: windowWidth - 68, + bottom: 50, + padding: 19, + borderRadius: 10, + justifyContent: 'space-between', + flexDirection: 'row', + }, + summaryContentText: { fontSize: 12, lineHeight: 18 }, + summayWhiteCardContentWrapper: { + justifyContent: 'space-between', + height: 50, + lineHeight: 18, + }, selectMainImageText: { fontSize: 16, color: mainBlue, fontFamily: 'AppleSDGothicNeoEB00' }, imageModal: { position: 'absolute', right: -17 }, selectedimageCancleButton: { diff --git a/components/Home/CheckListHome.tsx b/components/Home/CheckListHome.tsx index 7a0cba5..3318d7c 100644 --- a/components/Home/CheckListHome.tsx +++ b/components/Home/CheckListHome.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ScrollView, View } from 'react-native'; +import { RefreshControl, ScrollView, View } from 'react-native'; import { DefaultText } from '../../CustomText'; import styles from './styles'; @@ -9,9 +9,11 @@ import { homeScreenTypes } from '../../types/homeScreenTypes'; interface IProps { homeCheckList: homeScreenTypes[]; + onRefresh: any; + refreshing: boolean; } -function CheckListHome({ homeCheckList }: IProps) { +function CheckListHome({ homeCheckList, refreshing, onRefresh }: IProps) { return ( @@ -19,7 +21,11 @@ function CheckListHome({ homeCheckList }: IProps) { home sweet home 🏠 - + } + > + 📌 고정된 리스트 + {homeCheckList .filter((item) => item.pinned) diff --git a/components/Home/PinnedCheckList.tsx b/components/Home/PinnedCheckList.tsx index eb7b261..78772eb 100644 --- a/components/Home/PinnedCheckList.tsx +++ b/components/Home/PinnedCheckList.tsx @@ -20,7 +20,6 @@ function PinnedCheckList({ pinnedCheckList }: iProps) { }; return ( <> - 📌 고정된 리스트 {pinnedCheckList ? ( ([]); const [deletedCheckLists, setDeletedCheckLists] = useState([]); + const [checkListSummary, setCheckListSummary] = useState({}); const getServerData = async () => { try { const serverResponse = await axios.get( `/api/check-list/${checkListContext?.checkListId}/common?mainCategory=기본정보` ); + setCheckListSummary(serverResponse.data.data.information); setCheckLists([ ...serverResponse.data.data.questionList.map((item: checkListTypes) => ({ ...item, @@ -85,30 +88,29 @@ function BasicInfoOfBasicCheckList({ isEdit, setIsBottomSheet }: IProps) { - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - - ))} - - {deletedCheckLists.length !== 0 && ( - + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + - )} - + ))} + + {deletedCheckLists.length !== 0 && ( + + )} {myItems.map((myItem) => ( { + setRefreshing(true); + await getHomeDataHandler(); + setRefreshing(false); + }, []); const getHomeDataHandler = async () => { try { @@ -29,7 +37,11 @@ function Home() { <> {loading ? ( isCheckList ? ( - + ) : ( ) From ca83b79699484f7141ad34240e6635e26a6c2bfd Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 03:26:03 +0900 Subject: [PATCH 02/11] save --- .../ProfileSettingComponent.tsx | 35 +++++---- ios/Podfile.lock | 72 +++++++++---------- ios/amattang/Info.plist | 6 -- 3 files changed, 57 insertions(+), 56 deletions(-) diff --git a/components/ProfileSetting/ProfileSettingComponent.tsx b/components/ProfileSetting/ProfileSettingComponent.tsx index 74c4953..4adcbe1 100644 --- a/components/ProfileSetting/ProfileSettingComponent.tsx +++ b/components/ProfileSetting/ProfileSettingComponent.tsx @@ -4,7 +4,6 @@ import { DefaultText } from '../../CustomText'; import styles from './styles'; function ProfileSettingComponent() { - return ( <> @@ -16,9 +15,10 @@ function ProfileSettingComponent() { + 고객센터 Linking.openURL('https://www.naver.com')} + onPress={() => Linking.openURL('http://pf.kakao.com/_Numxeb')} style={styles.profileSettingEachElementWrapper} > @@ -26,8 +26,9 @@ function ProfileSettingComponent() { + Linking.openURL('https://www.naver.com')} + onPress={() => Linking.openURL('https://www.instagram.com/a_ma_ttang/')} style={styles.profileSettingEachElementWrapper} > @@ -35,11 +36,15 @@ function ProfileSettingComponent() { + 고객센터 + Linking.openURL('https://www.naver.com')} + onPress={() => + Linking.openURL('https://www.notion.so/2caa1719b6f74f228137d662d32dd374') + } style={styles.profileSettingEachElementWrapper} > @@ -48,7 +53,9 @@ function ProfileSettingComponent() { Linking.openURL('https://www.naver.com')} + onPress={() => + Linking.openURL('https://www.notion.so/85d38b79533142c9afa20a92614d9803') + } style={styles.profileSettingEachElementWrapper} > @@ -56,15 +63,15 @@ function ProfileSettingComponent() { - Linking.openURL('https://www.naver.com')} - style={styles.profileSettingEachElementWrapper} - > - - 오픈소스 라이선스 - - - + {/* Linking.openURL('https://www.naver.com')}*/} + {/* style={styles.profileSettingEachElementWrapper}*/} + {/*>*/} + {/* */} + {/* 오픈소스 라이선스*/} + {/* */} + {/* */} + {/**/} diff --git a/ios/Podfile.lock b/ios/Podfile.lock index beb8d8e..6a0ccda 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -11,7 +11,7 @@ PODS: - React-Core (= 0.67.2) - React-jsi (= 0.67.2) - ReactCommon/turbomodule/core (= 0.67.2) - - Flipper (0.99.0): + - Flipper (0.92.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -28,47 +28,47 @@ PODS: - Flipper-PeerTalk (0.0.4) - Flipper-RSocket (1.4.3): - Flipper-Folly (~> 2.6) - - FlipperKit (0.99.0): - - FlipperKit/Core (= 0.99.0) - - FlipperKit/Core (0.99.0): - - Flipper (~> 0.99.0) + - FlipperKit (0.92.0): + - FlipperKit/Core (= 0.92.0) + - FlipperKit/Core (0.92.0): + - Flipper (~> 0.92.0) - FlipperKit/CppBridge - FlipperKit/FBCxxFollyDynamicConvert - FlipperKit/FBDefines - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.99.0): - - Flipper (~> 0.99.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.99.0): + - FlipperKit/CppBridge (0.92.0): + - Flipper (~> 0.92.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.92.0): - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.99.0) - - FlipperKit/FKPortForwarding (0.99.0): + - FlipperKit/FBDefines (0.92.0) + - FlipperKit/FKPortForwarding (0.92.0): - CocoaAsyncSocket (~> 7.6) - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.99.0) - - FlipperKit/FlipperKitLayoutHelpers (0.99.0): + - FlipperKit/FlipperKitHighlightOverlay (0.92.0) + - FlipperKit/FlipperKitLayoutHelpers (0.92.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.99.0): + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.92.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutHelpers - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.99.0): + - FlipperKit/FlipperKitLayoutPlugin (0.92.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutHelpers - FlipperKit/FlipperKitLayoutIOSDescriptors - FlipperKit/FlipperKitLayoutTextSearchable - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.99.0) - - FlipperKit/FlipperKitNetworkPlugin (0.99.0): + - FlipperKit/FlipperKitLayoutTextSearchable (0.92.0) + - FlipperKit/FlipperKitNetworkPlugin (0.92.0): - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.99.0): + - FlipperKit/FlipperKitReactPlugin (0.92.0): - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.99.0): + - FlipperKit/FlipperKitUserDefaultsPlugin (0.92.0): - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.99.0): + - FlipperKit/SKIOSNetworkPlugin (0.92.0): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) @@ -480,7 +480,7 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.99.0) + - Flipper (= 0.92.0) - Flipper-Boost-iOSX (= 1.76.0.1.11) - Flipper-DoubleConversion (= 3.1.7) - Flipper-Fmt (= 7.1.7) @@ -488,19 +488,19 @@ DEPENDENCIES: - Flipper-Glog (= 0.3.6) - Flipper-PeerTalk (= 0.0.4) - Flipper-RSocket (= 1.4.3) - - FlipperKit (= 0.99.0) - - FlipperKit/Core (= 0.99.0) - - FlipperKit/CppBridge (= 0.99.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.99.0) - - FlipperKit/FBDefines (= 0.99.0) - - FlipperKit/FKPortForwarding (= 0.99.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.99.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.99.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.99.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.99.0) - - FlipperKit/FlipperKitReactPlugin (= 0.99.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.99.0) + - FlipperKit (= 0.92.0) + - FlipperKit/Core (= 0.92.0) + - FlipperKit/CppBridge (= 0.92.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.92.0) + - FlipperKit/FBDefines (= 0.92.0) + - FlipperKit/FKPortForwarding (= 0.92.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.92.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.92.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.92.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.92.0) + - FlipperKit/FlipperKitReactPlugin (= 0.92.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.92.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.92.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - "kakao-login (from `../node_modules/@react-native-seoul/kakao-login`)" - OpenSSL-Universal (= 1.1.180) @@ -678,7 +678,7 @@ SPEC CHECKSUMS: DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: 244195e30d63d7f564c55da4410b9a24e8fbceaa FBReactNativeSpec: c94002c1d93da3658f4d5119c6994d19961e3d52 - Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733 + Flipper: bc940dd278ca91f9b2d36b6fac5c098a8906ffa2 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b @@ -686,7 +686,7 @@ SPEC CHECKSUMS: Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 - FlipperKit: d8d346844eca5d9120c17d441a2f38596e8ed2b9 + FlipperKit: b2c08dc00bd104315cf3d0fe2f4939b0b20b407a fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 Google-Maps-iOS-Utils: 95d5ca4d2004314eff88c1819b969db6cac37ab6 @@ -746,6 +746,6 @@ SPEC CHECKSUMS: Yoga: 9b6696970c3289e8dea34b3eda93f23e61fb8121 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 4d8c02a502ba230519bdc76caaed1177ed2d3a33 +PODFILE CHECKSUM: d029bce6f42b50de8718bf24d7685ba0cdf0cafc COCOAPODS: 1.11.2 diff --git a/ios/amattang/Info.plist b/ios/amattang/Info.plist index 708ece4..69a34b1 100644 --- a/ios/amattang/Info.plist +++ b/ios/amattang/Info.plist @@ -35,12 +35,6 @@ 1 KAKAO_APP_KEY 3d5254ebc91a92469dde7bc04f9c74b1 - LSApplicationQueriesSchemes - - kakaokompassauth - storykompassauth - kakaolink - LSRequiresIPhoneOS NSAppTransportSecurity From ddd1b15e209050a2c912db6b6f4b8614d81062c3 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 04:19:19 +0900 Subject: [PATCH 03/11] =?UTF-8?q?fix:=20profileSetting=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=84=B8=ED=8C=85=20uri=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20=EB=B0=8F=20=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1=EC=9A=94=EC=86=8C=20=EC=82=AD=EC=A0=9C=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProfileSettingComponent.tsx | 6 -- components/ProfileSetting/styles.ts | 7 +- ios/Podfile.lock | 72 +++++++++---------- ios/amattang.xcodeproj/project.pbxproj | 20 +++++- 4 files changed, 58 insertions(+), 47 deletions(-) diff --git a/components/ProfileSetting/ProfileSettingComponent.tsx b/components/ProfileSetting/ProfileSettingComponent.tsx index 4adcbe1..e252c95 100644 --- a/components/ProfileSetting/ProfileSettingComponent.tsx +++ b/components/ProfileSetting/ProfileSettingComponent.tsx @@ -9,13 +9,7 @@ function ProfileSettingComponent() { - name: 최봉수 - - - - - 고객센터 Linking.openURL('http://pf.kakao.com/_Numxeb')} diff --git a/components/ProfileSetting/styles.ts b/components/ProfileSetting/styles.ts index 00de6c2..c00571f 100644 --- a/components/ProfileSetting/styles.ts +++ b/components/ProfileSetting/styles.ts @@ -1,8 +1,10 @@ -import { StyleSheet } from 'react-native'; +import { Dimensions, StyleSheet } from 'react-native'; import { mainBlue, mainLightBlue, mainOrange } from '../../color'; +const windowHeight = Dimensions.get('window').height; + const styles = StyleSheet.create({ - profileSettingOuterWrapper: { backgroundColor: 'white', flex: 1 }, + profileSettingOuterWrapper: { backgroundColor: 'white', flex: 1, height: windowHeight }, profileSettingName: { color: mainBlue, @@ -14,7 +16,6 @@ const styles = StyleSheet.create({ profileSettingInnerWrapper: { backgroundColor: mainLightBlue, margin: 17, - flex: 1, borderRadius: 16, }, profileSettingTitle: { diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6a0ccda..beb8d8e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -11,7 +11,7 @@ PODS: - React-Core (= 0.67.2) - React-jsi (= 0.67.2) - ReactCommon/turbomodule/core (= 0.67.2) - - Flipper (0.92.0): + - Flipper (0.99.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -28,47 +28,47 @@ PODS: - Flipper-PeerTalk (0.0.4) - Flipper-RSocket (1.4.3): - Flipper-Folly (~> 2.6) - - FlipperKit (0.92.0): - - FlipperKit/Core (= 0.92.0) - - FlipperKit/Core (0.92.0): - - Flipper (~> 0.92.0) + - FlipperKit (0.99.0): + - FlipperKit/Core (= 0.99.0) + - FlipperKit/Core (0.99.0): + - Flipper (~> 0.99.0) - FlipperKit/CppBridge - FlipperKit/FBCxxFollyDynamicConvert - FlipperKit/FBDefines - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.92.0): - - Flipper (~> 0.92.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.92.0): + - FlipperKit/CppBridge (0.99.0): + - Flipper (~> 0.99.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.99.0): - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.92.0) - - FlipperKit/FKPortForwarding (0.92.0): + - FlipperKit/FBDefines (0.99.0) + - FlipperKit/FKPortForwarding (0.99.0): - CocoaAsyncSocket (~> 7.6) - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.92.0) - - FlipperKit/FlipperKitLayoutHelpers (0.92.0): + - FlipperKit/FlipperKitHighlightOverlay (0.99.0) + - FlipperKit/FlipperKitLayoutHelpers (0.99.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.92.0): + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.99.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutHelpers - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.92.0): + - FlipperKit/FlipperKitLayoutPlugin (0.99.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutHelpers - FlipperKit/FlipperKitLayoutIOSDescriptors - FlipperKit/FlipperKitLayoutTextSearchable - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.92.0) - - FlipperKit/FlipperKitNetworkPlugin (0.92.0): + - FlipperKit/FlipperKitLayoutTextSearchable (0.99.0) + - FlipperKit/FlipperKitNetworkPlugin (0.99.0): - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.92.0): + - FlipperKit/FlipperKitReactPlugin (0.99.0): - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.92.0): + - FlipperKit/FlipperKitUserDefaultsPlugin (0.99.0): - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.92.0): + - FlipperKit/SKIOSNetworkPlugin (0.99.0): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) @@ -480,7 +480,7 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.92.0) + - Flipper (= 0.99.0) - Flipper-Boost-iOSX (= 1.76.0.1.11) - Flipper-DoubleConversion (= 3.1.7) - Flipper-Fmt (= 7.1.7) @@ -488,19 +488,19 @@ DEPENDENCIES: - Flipper-Glog (= 0.3.6) - Flipper-PeerTalk (= 0.0.4) - Flipper-RSocket (= 1.4.3) - - FlipperKit (= 0.92.0) - - FlipperKit/Core (= 0.92.0) - - FlipperKit/CppBridge (= 0.92.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.92.0) - - FlipperKit/FBDefines (= 0.92.0) - - FlipperKit/FKPortForwarding (= 0.92.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.92.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.92.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.92.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.92.0) - - FlipperKit/FlipperKitReactPlugin (= 0.92.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.92.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.92.0) + - FlipperKit (= 0.99.0) + - FlipperKit/Core (= 0.99.0) + - FlipperKit/CppBridge (= 0.99.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.99.0) + - FlipperKit/FBDefines (= 0.99.0) + - FlipperKit/FKPortForwarding (= 0.99.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.99.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.99.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.99.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.99.0) + - FlipperKit/FlipperKitReactPlugin (= 0.99.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.99.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - "kakao-login (from `../node_modules/@react-native-seoul/kakao-login`)" - OpenSSL-Universal (= 1.1.180) @@ -678,7 +678,7 @@ SPEC CHECKSUMS: DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: 244195e30d63d7f564c55da4410b9a24e8fbceaa FBReactNativeSpec: c94002c1d93da3658f4d5119c6994d19961e3d52 - Flipper: bc940dd278ca91f9b2d36b6fac5c098a8906ffa2 + Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b @@ -686,7 +686,7 @@ SPEC CHECKSUMS: Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 - FlipperKit: b2c08dc00bd104315cf3d0fe2f4939b0b20b407a + FlipperKit: d8d346844eca5d9120c17d441a2f38596e8ed2b9 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 Google-Maps-iOS-Utils: 95d5ca4d2004314eff88c1819b969db6cac37ab6 @@ -746,6 +746,6 @@ SPEC CHECKSUMS: Yoga: 9b6696970c3289e8dea34b3eda93f23e61fb8121 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: d029bce6f42b50de8718bf24d7685ba0cdf0cafc +PODFILE CHECKSUM: 4d8c02a502ba230519bdc76caaed1177ed2d3a33 COCOAPODS: 1.11.2 diff --git a/ios/amattang.xcodeproj/project.pbxproj b/ios/amattang.xcodeproj/project.pbxproj index d1a1b4e..507ff2c 100644 --- a/ios/amattang.xcodeproj/project.pbxproj +++ b/ios/amattang.xcodeproj/project.pbxproj @@ -471,7 +471,17 @@ baseConfigurationReference = EF69AFFC09A3127FB3EBDA9A /* Pods-amattang-amattangTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_ROOT}/Flipper-DoubleConversion/Frameworks\"", + "\"${PODS_ROOT}/GoogleMaps/Base/Frameworks\"", + "\"${PODS_ROOT}/GoogleMaps/Maps/Frameworks\"", + "\"${PODS_ROOT}/OpenSSL-Universal/Frameworks\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal\"", + ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -499,8 +509,14 @@ baseConfigurationReference = 350968AEFD941C314C4A290C /* Pods-amattang-amattangTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_ROOT}/GoogleMaps/Base/Frameworks\"", + "\"${PODS_ROOT}/GoogleMaps/Maps/Frameworks\"", + ); INFOPLIST_FILE = amattangTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -624,7 +640,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -682,7 +698,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", From ff85ca951ae7186518b7593e07fd56e9d1cf1d7b Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 04:42:35 +0900 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20profileSetting=20=EA=B0=84?= =?UTF-8?q?=EA=B2=A9=20=EC=A1=B0=EC=A0=95=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.tsx | 4 +--- components/ProfileSetting/ProfileSettingComponent.tsx | 2 ++ components/ProfileSetting/styles.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/App.tsx b/App.tsx index b272e33..8150036 100644 --- a/App.tsx +++ b/App.tsx @@ -5,11 +5,9 @@ import 'react-native-gesture-handler'; import RootNav from './navigation/Main/RootNav'; import OnBoardingStack from './navigation/OnBoarding/StackNavigationOfOnBoarding'; import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'; -import { getAccessToken, getRefreshToken, isLoggedIn } from 'react-native-axios-jwt'; +import { getAccessToken, isLoggedIn } from 'react-native-axios-jwt'; import { QueryClient, QueryClientProvider } from 'react-query'; import CheckListStore from './Context/CheckListByServer'; -import AsyncStorage from '@react-native-async-storage/async-storage'; -import KakaoLoginBtn from './components/Login/KakaoLoginBtn'; import axios from 'axios'; const queryClient = new QueryClient(); diff --git a/components/ProfileSetting/ProfileSettingComponent.tsx b/components/ProfileSetting/ProfileSettingComponent.tsx index e252c95..754e9d3 100644 --- a/components/ProfileSetting/ProfileSettingComponent.tsx +++ b/components/ProfileSetting/ProfileSettingComponent.tsx @@ -66,6 +66,8 @@ function ProfileSettingComponent() { {/* */} {/* */} {/**/} + + diff --git a/components/ProfileSetting/styles.ts b/components/ProfileSetting/styles.ts index c00571f..019f44b 100644 --- a/components/ProfileSetting/styles.ts +++ b/components/ProfileSetting/styles.ts @@ -47,7 +47,7 @@ const styles = StyleSheet.create({ fontSize: 18, }, profileSettingBottomElements: { - marginTop: 30, + marginTop: 15, marginBottom: 30, }, redText: { From 0e3d630907903977607c542ab2e9c091b2b67ab8 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 14:48:05 +0900 Subject: [PATCH 05/11] fix: checkListTypeC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사진을 터치했을 때 해당 사진으로 바로 이동 #70 --- components/CheckListComponent/ButtonsOfTypeC.tsx | 11 +++++++++-- components/CheckListComponent/CheckListImage.tsx | 10 ++++++++-- components/CheckListComponent/styles.tsx | 2 +- types/checkListTypes.ts | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/components/CheckListComponent/ButtonsOfTypeC.tsx b/components/CheckListComponent/ButtonsOfTypeC.tsx index 7bd1ee8..960906e 100644 --- a/components/CheckListComponent/ButtonsOfTypeC.tsx +++ b/components/CheckListComponent/ButtonsOfTypeC.tsx @@ -1,4 +1,4 @@ -import React, { Dispatch, SetStateAction } from 'react'; +import React, { Dispatch, SetStateAction, useState } from 'react'; import { DefaultText } from '../../CustomText'; import { checkListTypes } from '../../types/checkListTypes'; import { Image, Pressable, View } from 'react-native'; @@ -12,6 +12,7 @@ interface IProps { } function ButtonsOfTypeC({ setModal, modal, checkList }: IProps) { + const [order, setOrder] = useState(0); return ( <> @@ -21,6 +22,7 @@ function ButtonsOfTypeC({ setModal, modal, checkList }: IProps) { key={item.id} onPress={() => { setModal ? setModal(true) : null; + setOrder(item.order); }} > {checkList?.answer?.some((item) => item.id) ? ( - + ) : null} ); diff --git a/components/CheckListComponent/CheckListImage.tsx b/components/CheckListComponent/CheckListImage.tsx index 18996fd..4899f4e 100644 --- a/components/CheckListComponent/CheckListImage.tsx +++ b/components/CheckListComponent/CheckListImage.tsx @@ -2,7 +2,7 @@ import React, { Dispatch, SetStateAction, useContext, useRef, useState } from 'r import { DefaultText } from '../../CustomText'; import Modal from 'react-native-modal'; import { Dimensions, Image, Pressable, View } from 'react-native'; -import Carousel, { Pagination } from 'react-native-snap-carousel'; +import Carousel from 'react-native-snap-carousel'; import { answerButtonType } from '../../types/checkListTypes'; import styles from './styles'; import axios from 'axios'; @@ -12,10 +12,11 @@ interface IProps { checkList: answerButtonType[]; setModal?: Dispatch>; modal?: boolean; + order: number; } const windowWidth = Dimensions.get('window').width; -function CheckListImage({ checkList, setModal, modal }: IProps) { +function CheckListImage({ checkList, setModal, modal, order }: IProps) { const checkListContext = useContext(checkListCtx); const [index, setIndex] = useState(0); const isCarousel = useRef(null); @@ -33,11 +34,15 @@ function CheckListImage({ checkList, setModal, modal }: IProps) { setModal ? setModal(false) : null; } }; + console.log(checkList); const renderItem = ({ item }: any) => { return ( + + {item.order + 1} / {checkList.length} + mainImageHandler(item)}> 대표 사진으로 설정 @@ -57,6 +62,7 @@ function CheckListImage({ checkList, setModal, modal }: IProps) { Date: Thu, 31 Mar 2022 15:58:23 +0900 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20login=20=EC=95=A0=ED=94=8C=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=B0=8F=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=95=84=EC=9B=83=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.tsx | 6 ++++- .../CheckListComponent/CheckListImage.tsx | 4 ++-- components/Login/AppleLoginBtn.tsx | 24 +++++++++++++++---- components/Login/KakaoLoginBtn.tsx | 4 ++-- .../ProfileSettingComponent.tsx | 17 ++++++++++--- navigation/Main/RootNav.tsx | 10 +++++--- .../StackNavigationOfCheckList.tsx | 12 +++++++--- screens/ProfileSetting/ProfileSetting.tsx | 10 +++++--- 8 files changed, 66 insertions(+), 21 deletions(-) diff --git a/App.tsx b/App.tsx index 8150036..c2cc5b5 100644 --- a/App.tsx +++ b/App.tsx @@ -37,7 +37,11 @@ function App() { - {isLogin ? : } + {isLogin ? ( + + ) : ( + + )} diff --git a/components/CheckListComponent/CheckListImage.tsx b/components/CheckListComponent/CheckListImage.tsx index 4899f4e..73e73e4 100644 --- a/components/CheckListComponent/CheckListImage.tsx +++ b/components/CheckListComponent/CheckListImage.tsx @@ -12,13 +12,12 @@ interface IProps { checkList: answerButtonType[]; setModal?: Dispatch>; modal?: boolean; - order: number; + order: number | undefined; } const windowWidth = Dimensions.get('window').width; function CheckListImage({ checkList, setModal, modal, order }: IProps) { const checkListContext = useContext(checkListCtx); - const [index, setIndex] = useState(0); const isCarousel = useRef(null); const mainImageHandler = async (item: answerButtonType) => { @@ -62,6 +61,7 @@ function CheckListImage({ checkList, setModal, modal, order }: IProps) { item.toString()} firstItem={order} ref={isCarousel} data={checkList} diff --git a/components/Login/AppleLoginBtn.tsx b/components/Login/AppleLoginBtn.tsx index d6cade7..688510e 100644 --- a/components/Login/AppleLoginBtn.tsx +++ b/components/Login/AppleLoginBtn.tsx @@ -7,6 +7,7 @@ import styles from '../../screens/Landing/styles'; import jwtDecode from 'jwt-decode'; import axios from 'axios'; import { API_HOST } from '../../constant'; +import { setAccessToken, setAuthTokens } from 'react-native-axios-jwt'; interface tokenType { aud: string; @@ -25,6 +26,24 @@ interface tokenType { const AppleLoginBtn = ({ setIsLogin }: any) => { const onAppleLoginHandler = async () => { + const onLoginSuccess = (res: any) => { + const res_data = res.data.data; + let accessToken: string = ''; + if (Object.keys(res_data).includes('token')) { + // 재접속 + accessToken = res_data.token; + setAccessToken(accessToken); + } else { + // 처음 호출 + accessToken = res_data.accessToken; + setAuthTokens({ + accessToken: accessToken, + refreshToken: res_data.refreshToken, + }); + } + axios.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`; + setIsLogin(true); + }; try { // performs login request const appleAuthRequestResponse = await appleAuth.performRequest({ @@ -48,10 +67,7 @@ const AppleLoginBtn = ({ setIsLogin }: any) => { email: decodedToken.email, user: user, }) - .then((res) => { - axios.defaults.headers.common['Authorization'] = `Bearer ${res.data.data.accessToken}`; - setIsLogin(true); - }) + .then(onLoginSuccess) .catch((e) => { console.log(e); }); diff --git a/components/Login/KakaoLoginBtn.tsx b/components/Login/KakaoLoginBtn.tsx index 5741fd9..2aa6429 100644 --- a/components/Login/KakaoLoginBtn.tsx +++ b/components/Login/KakaoLoginBtn.tsx @@ -58,9 +58,9 @@ const KakaoLoginBtn = ({ setIsLogin }: Props) => { } axios.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`; setIsLogin(true); - const refreshToken = getRefreshToken().then((refreshToken) => console.log(refreshToken)); + // const refreshToken = getRefreshToken().then((refreshToken) => console.log(refreshToken)); // accessToken 만료하기 1분 전에 로그인 연장 - setTimeout(() => requestRefresh(refreshToken), acessTokenExpiresIn - 60000); + // setTimeout(() => requestRefresh(refreshToken), acessTokenExpiresIn - 60000); }; const catchError = (err: any) => { diff --git a/components/ProfileSetting/ProfileSettingComponent.tsx b/components/ProfileSetting/ProfileSettingComponent.tsx index 754e9d3..2f44733 100644 --- a/components/ProfileSetting/ProfileSettingComponent.tsx +++ b/components/ProfileSetting/ProfileSettingComponent.tsx @@ -1,9 +1,17 @@ -import React from 'react'; +import React, { Dispatch, SetStateAction } from 'react'; import { View, Image, Pressable, Linking, ScrollView } from 'react-native'; import { DefaultText } from '../../CustomText'; import styles from './styles'; +import { clearAuthTokens } from 'react-native-axios-jwt'; +interface IProps { + setIsLogin: Dispatch>; +} -function ProfileSettingComponent() { +function ProfileSettingComponent({ setIsLogin }: IProps) { + const onLogoutHandler = () => { + clearAuthTokens(); + setIsLogin(false); + }; return ( <> @@ -74,7 +82,10 @@ function ProfileSettingComponent() { 버전정보 1.0 - + 로그아웃 diff --git a/navigation/Main/RootNav.tsx b/navigation/Main/RootNav.tsx index 2490d14..06f5ef1 100644 --- a/navigation/Main/RootNav.tsx +++ b/navigation/Main/RootNav.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Dispatch, SetStateAction } from 'react'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import BottomNavigation from './BottomNavigation/BottomNavigation'; @@ -7,10 +7,14 @@ import { RootStackProps } from '../../types/navigationTypes'; const RootNav = createNativeStackNavigator(); -const Root = () => ( +interface IProps { + setIsLogin: Dispatch>; +} + +const Root = ({ setIsLogin }: IProps) => ( - + } /> ); export default Root; diff --git a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx index 7e05fb0..fc7b545 100644 --- a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx +++ b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useState } from 'react'; +import React, { Dispatch, SetStateAction, useContext, useState } from 'react'; import { Image, Pressable, Share } from 'react-native'; import BasicCheckList from './BasicCheckList/BasiclCheckList'; @@ -13,10 +13,16 @@ import { } from '@react-navigation/native-stack'; import { checkListCtx } from '../../../Context/CheckListByServer'; import axios from 'axios'; +import { useNavigation } from '@react-navigation/native'; const NativeStack = createNativeStackNavigator(); -function CheckListStackNav({ navigation }: CheckListStackProps) { +interface IProps { + setIsLogin: Dispatch>; +} + +function CheckListStackNav({ setIsLogin }: IProps) { + const navigation = useNavigation(); const checkListContext = useContext(checkListCtx); const [isEdit, setIsEdit] = useState(true); @@ -79,7 +85,7 @@ function CheckListStackNav({ navigation }: CheckListStackProps) { } options={() => ({ title: '설정', headerStyle: { backgroundColor: 'white' }, diff --git a/screens/ProfileSetting/ProfileSetting.tsx b/screens/ProfileSetting/ProfileSetting.tsx index 6808108..51620bf 100644 --- a/screens/ProfileSetting/ProfileSetting.tsx +++ b/screens/ProfileSetting/ProfileSetting.tsx @@ -1,8 +1,12 @@ -import React from 'react'; +import React, { Dispatch, SetStateAction } from 'react'; import ProfileSettingComponent from '../../components/ProfileSetting/ProfileSettingComponent'; -function ProfileSetting() { - return ; +interface IProps { + setIsLogin: Dispatch>; +} + +function ProfileSetting({ setIsLogin }: IProps) { + return ; } export default ProfileSetting; From 8d7a3c0e81c3e7e8390bec25a9c4b792821e7f4a Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 16:35:05 +0900 Subject: [PATCH 07/11] =?UTF-8?q?QA:=20=EC=B2=B4=ED=81=AC=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=93=9C=20?= =?UTF-8?q?=EC=99=BC=EC=AA=BD=EC=97=90=EC=84=9C=20=EC=98=A4=EB=A5=B8?= =?UTF-8?q?=EC=AA=BD=EC=9C=BC=EB=A1=9C=20=EC=8A=AC=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=93=9C=20=EA=B8=88=EC=A7=80=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CheckListComponent/CheckListComponent.tsx | 4 ++++ components/CheckListComponent/CheckListImage.tsx | 1 - .../Main/StackNavigation/StackNavigationOfCheckList.tsx | 9 +++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/CheckListComponent/CheckListComponent.tsx b/components/CheckListComponent/CheckListComponent.tsx index bf760bd..e3b4872 100644 --- a/components/CheckListComponent/CheckListComponent.tsx +++ b/components/CheckListComponent/CheckListComponent.tsx @@ -47,6 +47,10 @@ function CheckListComponent({ const panGesture = useAnimatedGestureHandler({ onActive: (event) => { translateX.value = event.translationX; + console.log(event.translationX); + if (event.translationX > 0) { + return; + } }, onEnd: () => { const shouldBeDismissed = translateX.value > -40; diff --git a/components/CheckListComponent/CheckListImage.tsx b/components/CheckListComponent/CheckListImage.tsx index 73e73e4..f57f3ee 100644 --- a/components/CheckListComponent/CheckListImage.tsx +++ b/components/CheckListComponent/CheckListImage.tsx @@ -33,7 +33,6 @@ function CheckListImage({ checkList, setModal, modal, order }: IProps) { setModal ? setModal(false) : null; } }; - console.log(checkList); const renderItem = ({ item }: any) => { return ( diff --git a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx index fc7b545..3cc6368 100644 --- a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx +++ b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx @@ -46,15 +46,16 @@ function CheckListStackNav({ setIsLogin }: IProps) { }; const onSubmitHandler = async () => { + console.log(checkListContext?.choseCheckListByServer); try { - await axios.put( - `/api/check-list/${checkListContext?.checkListId}/common/question`, - checkListContext?.choseCheckListByServer - ); await axios.put( `/api/check-list/${checkListContext?.checkListId}/common/question/status`, checkListContext?.deletedCheckListByServer ); + await axios.put( + `/api/check-list/${checkListContext?.checkListId}/common/question`, + checkListContext?.choseCheckListByServer + ); } catch (error) { console.error(error); } From d533e3ef86986e0ae4aa71e3b60fd04ec918b7f0 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 17:26:48 +0900 Subject: [PATCH 08/11] =?UTF-8?q?fix:=20=EC=B2=B4=ED=81=AC=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=93=9C=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CheckListComponent/CheckListComponent.tsx | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/components/CheckListComponent/CheckListComponent.tsx b/components/CheckListComponent/CheckListComponent.tsx index e3b4872..2c810a7 100644 --- a/components/CheckListComponent/CheckListComponent.tsx +++ b/components/CheckListComponent/CheckListComponent.tsx @@ -1,5 +1,5 @@ -import React, { Dispatch, SetStateAction, useEffect } from 'react'; -import { View } from 'react-native'; +import React, { Dispatch, SetStateAction, useEffect, useState } from 'react'; +import { Pressable, View } from 'react-native'; import { checkListTypes } from '../../types/checkListTypes'; import styles from './styles'; import ButtonsOfTypeA from './ButtonsOfTypeA'; @@ -30,6 +30,9 @@ interface IProps { setCheckLists: Dispatch>; onBoarding: boolean; } +type ContextType = { + translateX: number; +}; function CheckListComponent({ modal, @@ -43,13 +46,16 @@ function CheckListComponent({ onBoarding, }: IProps) { const translateX = useSharedValue(0); + const [isDelete, setIsDelete] = useState(false); - const panGesture = useAnimatedGestureHandler({ - onActive: (event) => { - translateX.value = event.translationX; - console.log(event.translationX); - if (event.translationX > 0) { - return; + const panGesture = useAnimatedGestureHandler({ + onStart: (event, context) => { + context.translateX = translateX.value; + }, + onActive: (event, context) => { + translateX.value = event.translationX + context.translateX; + if (event.translationX + context.translateX > 0) { + translateX.value = 0; } }, onEnd: () => { @@ -71,18 +77,24 @@ function CheckListComponent({ })); useEffect(() => { - translateX.value = 0; - }, [isEdit]); + translateX.value = withTiming(0); + }, [isEdit, isDelete]); return ( - + { + setIsDelete(!isDelete); + }} + style={styles.whiteCard} + key={checkList.questionId} + > {checkList.question} {checkList.rule ? ( @@ -137,7 +149,7 @@ function CheckListComponent({ /> ) : null} - + Date: Thu, 31 Mar 2022 18:46:17 +0900 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20checkList=20scroll=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=20=EB=B6=80=EB=93=9C=EB=9F=BD=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CheckListComponent/CheckListComponent.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/components/CheckListComponent/CheckListComponent.tsx b/components/CheckListComponent/CheckListComponent.tsx index 2c810a7..4efa167 100644 --- a/components/CheckListComponent/CheckListComponent.tsx +++ b/components/CheckListComponent/CheckListComponent.tsx @@ -32,6 +32,7 @@ interface IProps { } type ContextType = { translateX: number; + translateY: number; }; function CheckListComponent({ @@ -46,14 +47,17 @@ function CheckListComponent({ onBoarding, }: IProps) { const translateX = useSharedValue(0); - const [isDelete, setIsDelete] = useState(false); + const translateY = useSharedValue(0); const panGesture = useAnimatedGestureHandler({ onStart: (event, context) => { context.translateX = translateX.value; + context.translateY = translateY.value; }, onActive: (event, context) => { translateX.value = event.translationX + context.translateX; + translateY.value = event.translationY; + if (event.translationX + context.translateX > 0) { translateX.value = 0; } @@ -78,23 +82,17 @@ function CheckListComponent({ useEffect(() => { translateX.value = withTiming(0); - }, [isEdit, isDelete]); + }); return ( - { - setIsDelete(!isDelete); - }} - style={styles.whiteCard} - key={checkList.questionId} - > + {checkList.question} {checkList.rule ? ( From 0c68e5679740530891d8b318c1a59d18cfd78f16 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 18:55:41 +0900 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20QA=20=EB=94=94=EC=9E=90=EC=9D=B8?= =?UTF-8?q?=20=ED=81=90=EC=97=90=EC=9D=B4=20=EC=A7=84=ED=96=89=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CheckListComponent/styles.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/CheckListComponent/styles.tsx b/components/CheckListComponent/styles.tsx index 36b5289..5e64a86 100644 --- a/components/CheckListComponent/styles.tsx +++ b/components/CheckListComponent/styles.tsx @@ -90,7 +90,7 @@ const styles = StyleSheet.create({ width: windowWidth - 34, borderRadius: 14, }, - checkListMainTitle: { fontSize: 20 }, + checkListMainTitle: { fontSize: 20, lineHeight: 32 }, buttonsOfCheckList: { marginTop: 40, flexDirection: 'row', @@ -104,7 +104,7 @@ const styles = StyleSheet.create({ }, subTitles: { marginTop: 14 }, - checkListSubTitle: { flexDirection: 'row' }, + checkListSubTitle: { flexDirection: 'row', marginRight: 15 }, checkListGrayText: { color: '#7C7C7C', lineHeight: 24 }, checkListWhiteText: { color: 'white', lineHeight: 24 }, typeABtnWrapper: { From a9c26916e2b83813af3cf0b1873ec1398313c214 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Thu, 31 Mar 2022 21:46:45 +0900 Subject: [PATCH 11/11] =?UTF-8?q?fix:=20QA=20=ED=85=8D=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=83=89=EC=83=81,=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EC=8B=9C=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EC=98=AC=EB=A6=AC=EB=8A=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EA=B5=AC=ED=98=84=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CheckListComponent/ButtonsOfTypeB.tsx | 1 + .../CheckListComponent/ButtonsOfTypeD.tsx | 1 + .../myItem/MyItemOfBottomSheets.tsx | 2 + .../StackNavigationOfCheckList.tsx | 25 ++++++---- screens/BasicCheckList/Inside/Bathroom.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Ceiling.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Entrance.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Kitchen.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Option.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Wall.tsx | 46 ++++++++++--------- screens/BasicCheckList/Inside/Window.tsx | 45 +++++++++--------- .../OutsideOfBasicCheckList.tsx | 45 +++++++++--------- 12 files changed, 217 insertions(+), 178 deletions(-) diff --git a/components/CheckListComponent/ButtonsOfTypeB.tsx b/components/CheckListComponent/ButtonsOfTypeB.tsx index f335dff..79afbac 100644 --- a/components/CheckListComponent/ButtonsOfTypeB.tsx +++ b/components/CheckListComponent/ButtonsOfTypeB.tsx @@ -98,6 +98,7 @@ function ButtonsOfTypeB({ isEdit, checkList, setCheckLists, checkLists }: IProps onChangeText={onChangeText} onEndEditing={() => onEndEditing(answer)} placeholder={answer.type ? answer.type : '직접 입력'} + placeholderTextColor={'#D6D4D4'} style={[styles.typeDBtnWrapper]} /> diff --git a/components/CheckListComponent/ButtonsOfTypeD.tsx b/components/CheckListComponent/ButtonsOfTypeD.tsx index 2043245..dbe36d6 100644 --- a/components/CheckListComponent/ButtonsOfTypeD.tsx +++ b/components/CheckListComponent/ButtonsOfTypeD.tsx @@ -157,6 +157,7 @@ function ButtonsOfTypeD({ isEdit, checkList, setCheckLists, checkLists }: IProps onChangeText={onChangeTextHandler} onEndEditing={onEndEditing} placeholder={'+ 직접 입력'} + placeholderTextColor={'#D6D4D4'} value={newCheckListElement} style={[styles.typeDBtnWrapper, styles.typeDInputBtnWrapper]} /> diff --git a/components/CheckListComponent/myItem/MyItemOfBottomSheets.tsx b/components/CheckListComponent/myItem/MyItemOfBottomSheets.tsx index 26fa8a1..466316c 100644 --- a/components/CheckListComponent/myItem/MyItemOfBottomSheets.tsx +++ b/components/CheckListComponent/myItem/MyItemOfBottomSheets.tsx @@ -81,6 +81,7 @@ function MyItemOfBottomSheets({ onCategoryNameHandler(newCategoryName)} @@ -98,6 +99,7 @@ function MyItemOfBottomSheets({ onCreateQuestionElementTextHandler(elementText)} diff --git a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx index 3cc6368..5637aff 100644 --- a/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx +++ b/navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx @@ -46,22 +46,27 @@ function CheckListStackNav({ setIsLogin }: IProps) { }; const onSubmitHandler = async () => { - console.log(checkListContext?.choseCheckListByServer); - try { - await axios.put( + await axios + .put( `/api/check-list/${checkListContext?.checkListId}/common/question/status`, checkListContext?.deletedCheckListByServer - ); - await axios.put( + ) + .then(() => checkListContext?.setDeletedCheckListByServer({ question: [] })); + + await axios + .put( `/api/check-list/${checkListContext?.checkListId}/common/question`, checkListContext?.choseCheckListByServer + ) + .then(() => + checkListContext?.setChoseCheckListByServer({ + typeA: [], + typeB: [], + typeD: [], + typeM: {}, + }) ); - } catch (error) { - console.error(error); - } - checkListContext?.setDeletedCheckListByServer({ question: [] }); - checkListContext?.setChoseCheckListByServer({ typeA: [], typeB: [], typeD: [], typeM: {} }); setIsEdit(false); }; diff --git a/screens/BasicCheckList/Inside/Bathroom.tsx b/screens/BasicCheckList/Inside/Bathroom.tsx index 19aef4f..2bcf8fc 100644 --- a/screens/BasicCheckList/Inside/Bathroom.tsx +++ b/screens/BasicCheckList/Inside/Bathroom.tsx @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList'; import { GetCheckListServerData } from '../../../api/GetCheckListServerData'; import { checkListCtx } from '../../../Context/CheckListByServer'; +import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; interface IProps { isEdit: boolean; @@ -76,29 +77,32 @@ function Bathroom({ isEdit, setIsBottomSheet }: IProps) { <> {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + + {onServerData ? ( - - {checkLists - .filter((item) => item.visibility) - .map((mainQuestionItem: checkListTypes) => ( - + + {checkLists + .filter((item) => item.visibility) + .map((mainQuestionItem: checkListTypes) => ( + + ))} + + {deletedCheckLists.length !== 0 && ( + - ))} - - {deletedCheckLists.length !== 0 && ( - - )} - + )} + +