-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
여행 아이템 정보 수정/삭제 기능 구현 #133
Conversation
<MenuItem onClick={() => {}}>수정</MenuItem> | ||
<MenuItem onClick={() => {}}>삭제</MenuItem> | ||
<MenuItem onClick={openModal}>수정</MenuItem> | ||
<MenuItem onClick={handleTripItem}>삭제</MenuItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleTripItemDelete
은 어떤가유.. 하는 일도 그거 한가지라..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헐.... handleTripItemDelete라고 한 줄 알았어요...... 수정하겠습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정삭제까지 뚝딱~~~ 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -20,7 +20,7 @@ | |||
"@tanstack/react-query": "^4.29.19", | |||
"axios": "^1.4.0", | |||
"dotenv": "^16.3.1", | |||
"hang-log-design-system": "^1.1.25", | |||
"hang-log-design-system": "^1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
드디어 1.2.0 ...!!ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그런데 곧 1.2.1 갈듯...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋㅋㅋㅋ오케 좋습니다
@@ -0,0 +1,17 @@ | |||
import { END_POINTS } from '@/constants/api'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로 확인해주세요!
@@ -1,3 +1,5 @@ | |||
import TripItemAddModal from '@/components/trip/TripItemAddModal/TripItemAddModal'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로 확인해주세요!
@@ -1,3 +1,5 @@ | |||
import TripItemAddModal from '@/components/trip/TripItemAddModal/TripItemAddModal'; | |||
import { useTripDates } from '@/hooks/trip/useTripDates'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로 확인해주세요!
export const useDayLogTitleMutation = () => { | ||
const dayLogTitleMutation = useMutation(patchDayLogTitle(), { | ||
onError: () => { | ||
alert('오류가 발생했습니다. 잠시 후 다시 시도해주세요.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
에러 메시지 상수화는 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아요!
@@ -48,6 +66,7 @@ const TripItemAddModal = ({ tripId, dayLogId, dates, onClose }: TripItemAddModal | |||
<PlaceInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정해달라는 코멘트는 아닙니다!
이 부분 코드를 어찌저찌 읽긴 했지만 코드 읽기가 쉽지 않더라구요🥲
updateInputValue
가 useAddTripItemForm
에서 시작해서 PlaceInput
으로 간 뒤 PlaceInput
에서 useTripItemPlaceInput
훅을 사용하기 위해 인자로 넣어주고 있어요...
최종적으로 handlePlaceChange
를 사용하기 위해 4번을 거쳐 가는지라 이해하기 쉽지 않더군요🥲 제네릭 타입이라 중간중간에 타입 파일로도 확인하러도 계속 이동하고요 흑흑
updateInputValue라는 네이밍도 뭔가 값일것같은데 함수인 것도 살짝 어색한 것 같구요...!
애슐리 워낙 타입스크립트 잘 다루면서 코드도 잘 짜주시다 보니 물론 제 코드 해석력이 문제일수도 있지만요🥲
이 부분도 개선할 수 있을까요?!
당장 기능은 아주 잘 동작하니 꼭 개선해달라 그런건 아닙니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이 부분이 좀 마음에 안 들어요...... 🥲 그런데 어떻게 처리하느게 좋을지 모르겠어요. 뭔가 hook으로 분리를 안 하면 컴포넌트 내부에 로직이 너무 많아지고, 보이는 부분에만 집중하지 못하고, 또 커스텀 훅으로 분리하면 지금처럼 미친듯한 depth가 발생하고요... 지금은 어떻게 하면 좋을지 잘 모르겠어서 이건 리팩토링하면서 조금 더 고민해볼게요!
함수명 updateInputValue
는 인풋 값을 업데이트한다는 의미로 그렇게 명명했어요! 어떤 부분에서 네이밍이 어색한가요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠 지금보니까 괜찮은거같기도...?🤔ㅋㅋㅋㅋㅋㅋㅋ
이대로 갑시다 네이밍
@Dahyeeee 헤다는 이 부분에 대해 어떻게 생각하세요?? 저는 끝이 애매하게 잘려서 사용자가 스크롤이 있다는 것을 인지하지 못 할 수도 있다고 생각해서 overflow: scroll을 추가했어요! 그런데 overflow scroll 말고 overflow: auto로 했어야 했네요... 행록 1.2.1 갑니다................................. |
스크롤바 없으면 마우스로 스크롤하기가 불가능하기도 하고 애슐리 말대로 사용자가 스크롤 가능한지 모를 수도?! 스크롤바 없으면 데스크탑 마우스로 스크롤하기 불가능한 건 사실 citySearchBar에서도 마찬가지인긴 한데 citySearchBar는 스크롤바생기면 좀 뚱뚱 못생겨져서 일단 그냥 두는걸로..? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯💯💯
@@ -20,7 +20,7 @@ | |||
"@tanstack/react-query": "^4.29.19", | |||
"axios": "^1.4.0", | |||
"dotenv": "^16.3.1", | |||
"hang-log-design-system": "^1.1.25", | |||
"hang-log-design-system": "^1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋㅋㅋㅋ오케 좋습니다
@@ -48,6 +66,7 @@ const TripItemAddModal = ({ tripId, dayLogId, dates, onClose }: TripItemAddModal | |||
<PlaceInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠 지금보니까 괜찮은거같기도...?🤔ㅋㅋㅋㅋㅋㅋㅋ
이대로 갑시다 네이밍
📄 Summary
+
🙋🏻 More
close #126