-
Notifications
You must be signed in to change notification settings - Fork 4
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
[ Fix ] 약속 리스트 페이지 에러 처리 #287
Conversation
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.
LGTM
const { prevTap } = location.state || {}; | ||
|
||
const [tap, setTap] = useState('pending'); |
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.
P4) 개인적인 생각으로 tap 이라는 변수명이 의도가 직관적으로 와닿지 않아서 appointmentStatus 등의 의미가 드러나는 이름을 사용하면 좋을 것 같습니다!
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.
LGTM 고생하셨습니당! 코리 몇 개만 확인해주세용 🚀🚀🚀
{viewType === 'DECLINE' ? ( | ||
<AutoCloseModal text="선약이 거절되었어요" showModal={isModalOpen} handleShowModal={handleModalOpen} path="/promiseList"> | ||
<AutoCloseModal | ||
text="선약이 거절되었어요" | ||
showModal={isModalOpen} | ||
handleShowModal={handleModalOpen} | ||
path="/promiseList"> | ||
<ModalRejectImg /> | ||
</AutoCloseModal> | ||
) : ( | ||
<AutoCloseModal text="선약이 수락되었어요" showModal={isModalOpen} handleShowModal={handleModalOpen} path="/promiseList"> | ||
<AutoCloseModal | ||
text="선약이 수락되었어요" | ||
showModal={isModalOpen} | ||
handleShowModal={handleModalOpen} | ||
path="/promiseList"> | ||
<ModalAcceptImg /> | ||
</AutoCloseModal> | ||
)} |
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.
viewType에 따라 text랑 Img만 조건부 넣어주면 더 깔끔해질 것 같아요!
<AutoCloseModal
text={viewType === 'DECLINE' ? "거절" : "수락"}
...
/>
{viewType === 'DECLINE' ? <RejectImg/> : <AcceptImg/>}
@@ -74,11 +74,11 @@ export const usePatchSeniorAccept = (onSuccessCallback?: () => void) => { | |||
}, | |||
}); | |||
|
|||
return { mutate, data }; | |||
return { mutate, data, isPending, isError }; | |||
}; |
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 폴더로 빼서 파일 분리 해주면 좋을 것 같아요!
#️⃣ Related Issue
Closes #283
✅ Done Task
☀️ New-insight
💎 PR Point
약속디테일페이지
로 전달되는 값들이 undefined로 잡힐 경우 다시약속 리스트
로 라우팅 시켜줬습니다 (location.state의 값들이 전부 약속리스트 페이지에서부터 전달되기 때문에)이렇게 두 개의 api를 쏴야하는데, 구글밋 링크 생성 api가 생각보다 오래걸려서 (1~2초 정도) 사용자가 이게 요청이 간 건지 모를 것 같더라구요
isLoading 받아와서 로딩스피너 추가해주었습니다.
📸 Screenshot
약속 수락 로딩스피너 추가한 부분
2024-10-14.11.44.14.mov