-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#497] [책 상세] 책 상세 페이지 api 연결 #500
Conversation
- api, query 함수명에 명확히 bookmark를 포함하도록 수정
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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이름과 변수명들이 직관적으로 바뀌어 읽기 쉬웠던것같아요
코멘트 몇가지 확인해주세요!
isOpen={isDrawerOpen} | ||
onClose={onDrawerClose} | ||
title="책 코멘트 작성하기" | ||
placeholder="작성해주신 코멘트가 다른 사람들에게 많은 도움이 될 거예요!" |
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.
p5;
placeholder에 추가적으로
하나의 도서에 하나의 코멘트만 작성할 수 있음을 강조해주어도 좋을것같아요!
const useUpdateBookmarkMutation = (bookId: APIBook['bookId']) => { | ||
const queryClient = useQueryClient(); | ||
const bookmarkQueryKey = bookKeys.bookmark(bookId); | ||
|
||
return useMutation({ | ||
mutationFn: (newValue: boolean) => updateBookmark({ bookId, newValue }), | ||
onMutate: async newValue => { | ||
await queryClient.cancelQueries({ queryKey: bookmarkQueryKey }); | ||
|
||
const previousData = | ||
queryClient.getQueryData<APIBookmarkedUserList>(bookmarkQueryKey); | ||
|
||
if (previousData) { | ||
// 낙관적 업데이트 | ||
queryClient.setQueryData<APIBookmarkedUserList>(bookmarkQueryKey, { | ||
...previousData, | ||
isInMyBookshelf: newValue, | ||
}); | ||
} | ||
|
||
return { previousData }; | ||
}, | ||
onError: (_err, _variables, context) => { | ||
if (!context || !context.previousData) { | ||
return; | ||
} | ||
|
||
queryClient.setQueryData<APIBookmarkedUserList>( | ||
bookmarkQueryKey, | ||
context.previousData | ||
); | ||
}, | ||
onSettled: () => { | ||
queryClient.invalidateQueries({ queryKey: bookmarkQueryKey }); | ||
}, | ||
}); | ||
}; |
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.
ask;
제 크롬 익스텐션 문제였군요 🤣
const handleButtonClick = () => { | ||
if (!isAuthenticated) { | ||
// TODO: 로그인 유도 모달로 변경 | ||
showToast({ type: 'normal', message: '로그인 후에 책을 꽂을 수 있어요' }); | ||
return; | ||
} |
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.
👍
onSettled: () => { | ||
queryClient.invalidateQueries(bookKeys.comments(bookId)); | ||
}, |
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.
p1;
👀
onSettled: () => { | |
queryClient.invalidateQueries(bookKeys.comments(bookId)); | |
}, | |
onSettled: () => { | |
queryClient.invalidateQueries({ queryKey: bookKeys.comments(bookId) }); | |
}, |
|
||
CommentDrawer.displayName = 'CommentDrawer'; | ||
|
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.
ask;
해당 코드는 처음보는것같아요!
링크에 해당하는 부분을 해결하기 위해 작성되었을까요!?
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.
네 맞아요! 👍🏻
import Modal from '@/v1/base/Modal'; | ||
import EditCommentDrawer from './CommentDrawer'; |
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.
p3;
정말 사소한 부분이지만...
절대 경로로 수정해주세요!?
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.
💯
* Revert "[#634] v1 디렉토리 네이밍 수정 (#635)" This reverts commit 86c304a. * Revert "[#632] 사용하지 않는 라이브러리 제거 (#633)" This reverts commit 34b4efb. * Revert "[#627] 불필요한 utils, hooks, constants 정리 및 import문 통일 (#631)" This reverts commit 254f6bb. * Revert "[#629] tailwind config color 정리 (#630)" This reverts commit 595f476. * Revert "[#622] BottomActionButton 패딩 수정 (#626)" This reverts commit 9796dab. * Revert "[#625] Toast 컴포넌트 icon이 잘리는 문제 해결 (#628)" This reverts commit e868efc. * Revert "[#623] [도서 검색] Input 검색 아이콘 Layout Shift 해결 (#624)" This reverts commit d0392d6. * Revert "[#619] PWA 구현 (#621)" This reverts commit 587f990. * Revert "[#616] 책장 좋아요 뱃지 UI 수정 (#620)" This reverts commit 70af27a. * Revert "[#349] 메타 데이터 추가 (#617)" This reverts commit 209ba3e. * Revert "[#556] 버튼 컴포넌트 disabled style 작성 (#615)" This reverts commit 0425223. * Revert "[#610] 로그인 페이지 구현 (#614)" This reverts commit badcf8e. * Revert "[#608] 페이지 접근 권한 부여 (#611)" This reverts commit 7f1cd21. * Revert "[#612] 북카이브 페이지에서 발생하는 무한 리랜더링 버그 수정 (#613)" This reverts commit bac4ff2. * Revert "[#605] Google LightHouse CI 추가 (#606)" This reverts commit d6cccdb. * Revert "[#602] [모임 생성] 퍼널 progress bar, stepper 구현 (#607)" This reverts commit bcbdc67. * Revert "[#603] [내 프로필] ErrorBoundary 제거 (#604)" This reverts commit f044cd2. * Revert "feat: start-ssl script 작성 (#601)" This reverts commit 8de7079. * Revert "[#596] accessToken이 만료된 직후 다른 페이지 접근할 때 에러 페이지를 보여주지 않고 새로고침 (#600)" This reverts commit 59407c6. * Revert "[#592] [도서 검색] 검색 키워드 및 결과 유지 기능 구현 (#593)" This reverts commit af2413c. * Revert "[#595] Toast UI 개선 (#597)" This reverts commit 52e9992. * Revert "[#591] 3D 책 컴포넌트, 책장 페이지 개선 (#594)" This reverts commit 2beb0f2. * Revert "[#570] [도서 검색] 도서 검색 결과 렌더링 시 search 헤더 숨기고 input sticky 적용 (#589)" This reverts commit 0ff4ca0. * Revert "[#588] 폰트 디자인 시스템 적용 (#590)" This reverts commit 6a054a4. * Revert "[#557] [도서 검색] 최근 검색어 api 요청 (#587)" This reverts commit 591e9a8. * Revert "[#585] [프로필 페이지] '참여한 모임' 영역 사용자가 모임장인 모임에 마크 추가 (#586)" This reverts commit 3a3f263. * Revert "[#575] Drawer 컴포넌트 개선 (#576)" This reverts commit cff01fd. * Revert "[#581] [모임 생성] 모임 생성 퍼널 페이지 작성 (#582)" This reverts commit 55a08ee. * Revert "[#583] Switch 컴포넌트 style 수정 (#584)" This reverts commit e7798f7. * Revert "[#578] iOS 환경에서의 DatePicker UI 수정 (#579)" This reverts commit 24b42bf. * Revert "[#574] FloatingButton 버그 수정 (#577)" This reverts commit dd37ff5. * Revert "[#559] BookInfoCard 컴포넌트 수정 및 goToBookSelectStep 이벤트 추가 (#572)" This reverts commit f1c6a3c. * Revert "[#571] Drawer 컴포넌트 style 개선 (#573)" This reverts commit f21ada4. * Revert "[#561] [모임 생성] 모임 상세 퍼널 개선 (#567)" This reverts commit bbd1123. * Revert "[#552] next custom server 구동 시 hmr이 동작하지 않는 문제 해결 (#569)" This reverts commit 019abd5. * Revert "[#563] [모임 생성] 모임 가입문제 퍼널 (#568)" This reverts commit 4d6a14f. * Revert "[#564] BottomActionButton 컴포넌트 position 속성 수정 (#566)" This reverts commit 94365ee. * Revert "[#562] [모임 생성] 모임 이름 퍼널 (#565)" This reverts commit 0bd1349. * Revert "[#543] [모임 생성] 책 선택 퍼널 (#560)" This reverts commit b2f5236. * Revert "[#553] [모임 생성] 모임 상세 퍼널 (#558)" This reverts commit 31a6d84. * Revert "[#554] 스토리북 preview decorator에서 Layout 제거 (#555)" This reverts commit 495321e. * Revert "[#549] 'unable to verify first certificate' 에러 해결 (#550)" This reverts commit bdfa458. * Revert "fix: 모바일 환경에서의 스크롤 버그 수정 (#551)" This reverts commit 1d56794. * Revert "[#546] [독서모임] 모임 페이지 누락된 작업 및 버그 수정 (#547)" This reverts commit 448e8b5. * Revert "[#531] 로컬 서버에 https 적용 (#541)" This reverts commit f2f4a82. * Revert "[#540] [모임 생성] 모임 상세 퍼널 마크업 (#542)" This reverts commit 5d23ab3. * Revert "[#544] vscode react component snippet 작성 (#545)" This reverts commit 68dc181. * Revert "[#535] [독서모임] 독서모임 목록 페이지 개선 (#539)" This reverts commit 56137df. * Revert "[#505] [모임 상세] 모임 삭제 기능 구현 (#537)" This reverts commit efdb2c5. * Revert "[#530] FloatingButton 컴포넌트 적용 (#536)" This reverts commit 3671624. * Revert "[#529] redirect 페이지 개선, 토큰 업데이트 로직 개선 (#532)" This reverts commit 0867ee4. * Revert "[#523] [모임 상세] 모임 수정 페이지 (#527)" This reverts commit f889a79. * Revert "[#526] 도서 검색 페이지 개선 (#528)" This reverts commit 81b39b7. * Revert "[#524] Menu 컴포넌트 개선 (#525)" This reverts commit 52687da. * Revert "[#521] TextArea 컴포넌트 (#522)" This reverts commit a1673f6. * Revert "[#518] Input 컴포넌트 style 추가 (#519)" This reverts commit 2bd859a. * Revert "[#516] DatePicker 컴포넌트 (#520)" This reverts commit 63af14d. * Revert "[#504] [모임 상세] 모임 게시글 작성 기능 구현 (#517)" This reverts commit e6f8d87. * Revert "[#509] [레이아웃] BottomNavigation 버그 및 UI 수정 (#510)" This reverts commit ada909a. * Revert "feat: 모임 게시글 수정, 삭제 기능 구현 (#513)" This reverts commit 36c1e71. * Revert "[#507] [프로필] 로그아웃 햄버거 구현 (#508)" This reverts commit 90c5855. * Revert "feat: hosts 파일을 수정할 수 있는 updateDevHost script 작성 (#511)" This reverts commit cd297e9. * Revert "[#497] [책 상세] 책 상세 페이지 api 연결 (#500)" This reverts commit 7842028. * Revert "[#498] useFunnel 작성 (#501)" This reverts commit e6f7878. * Revert "[#489] [도서 검색] 도서검색 페이지 개선 작업 (#490)" This reverts commit 0043fe7. * Revert "[#491] [도서 검색] 베스트셀러 클릭 시 라우팅 경로 수정 (알라딘 -> 다독다독) (#492)" This reverts commit e68d1d3. * Revert "[#493] 에러 페이지 (#494)" This reverts commit e95c940. * Revert "[#495] [책 상세] 책 상세 페이지 마크업 (#496)" This reverts commit 052e6d4. * Revert "[#474] 리프레시 토큰이 만료된 경우 에러 페이지로 넘어가는 이슈 수정 (#483)" This reverts commit 633da9f. * Revert "[#486] [책 상세 / 모임 상세] 코멘트 목록 컴포넌트 (#487)" This reverts commit f452642. * Revert "[#443] TopNavigation 컴포넌트 스타일 fixed 적용 (#488)" This reverts commit 60d3311. * Revert "[#468] [검색] 검색 페이지 작성 (#478)" This reverts commit 313d61a. * Revert "[#481] [책 상세] 책 정보 컴포넌트 (#482)" This reverts commit 03fa16e. * Revert "[#442] 스켈레톤 컴포넌트 작성 (#480)" This reverts commit 22b06a2. * Revert "[#453] [모임] 모임 목록 페이지 개선 (#475)" This reverts commit c6b1ab1. * Revert "typo: 오타 수정 (#485)" This reverts commit 395e050. * Revert "[#476] [모임 상세] 비로그인 시 모임 참여하기 버튼 비활성화 (#479)" This reverts commit a2e628d. * Revert "[#472] Drawer 컴포넌트 (#477)" This reverts commit 5e54b72. * Revert "[#470] Menu 컴포넌트 (#471)" This reverts commit 0a4705d. * Revert "[#465] [모임] BookInfoCard 컴포넌트 추상화 (#466)" This reverts commit 81bc6d8. * Revert "[#467] 내가 가입한 모임 상세 페이지 (#469)" This reverts commit 75070ce. * Revert "[#463] Loading 컴포넌트 animation 버그 해결 (#464)" This reverts commit 8219f67. * Revert "[#456] [프로필] 프로필 페이지 (#461)" This reverts commit 150592c. * Revert "[#455] [모임 상세] 모임 가입 문제 페이지 (#462)" This reverts commit 7bbdbaf. * Revert "[#459] [유저 로그인] 로그인 BottomSheet 컴포넌트 작성 (#460)" This reverts commit da3fb33. * Revert "[#457] LikeButton 컴포넌트 (#458)" This reverts commit 9d1a5c7. * Revert "베이스 컴포넌트 위치 변경 (#454)" This reverts commit fd8ad31. * Revert "[#447] [모임 상세] 모임 참여 여부, 모임장 여부에 따른 UI 구현 (#450)" This reverts commit 61ada97. * Revert "[#449] [책장] 책장 상세 페이지 (#451)" This reverts commit 1f389e4. * Revert "[#445] Layout 컴포넌트에서 TopHeader 컴포넌트 분리 (#452)" This reverts commit 9d11c70. * Revert "[#415] [프로필] 프로필 생성 페이지 (#427)" This reverts commit 4175612. * Revert "[fix] group 페이지 타입 에러 수정 (#448)" This reverts commit 66005ea. * Revert "[#434] [모임 상세] 독서모임 상세 페이지 api 연결 (#441)" This reverts commit 617614f. * Revert "[#439] [독서모임] 모임 목록 페이지 리팩토링 (#440)" This reverts commit f50f393. * Revert "[#414] [프로필] 프로필 수정 페이지 (#426)" This reverts commit 91b8171. * Revert "[#437] [독서모임] Avartar, bookGroupStatus 적용 및 typo 수정 (#438)" This reverts commit b56d3d5. * Revert "[#412] [북카이브] 북카이브 페이지 (회원) (#436)" This reverts commit 434dd73. * Revert "[refactor] bookcover v1 폴더로 이동 (#433)" This reverts commit 434dd8c. * Revert "[refactor] 폴더 및 파일 구조, 네이밍 수정 (#432)" This reverts commit 5ba2e21. * Revert "[fix] github 에서 대소문자 구문하지 못하는 문제 해결 (#431)" This reverts commit 549a5e9. * Revert "[#403] [모임 상세] 모임 정보 컴포넌트 (#423)" This reverts commit 378828c. * Revert "fix: 이벤트 핸들러 명칭 변경" This reverts commit de6588c. * Revert "fix: 컴포넌트명 변경" This reverts commit 03899d7. * Revert "fix: 스타일 관련 코드 수정 및 불필요한 요소 제거" This reverts commit 14a6b84. * Revert "feat: 내가 가입한 모임 simple ui 구현" This reverts commit 5dd3e60. * Revert "[#410] [북카이브] 북카이브 페이지 (비회원) (#425)" This reverts commit 08c919d. * Revert "[#411][독서 모임] Detail 독서 모임 컴포넌트 (#428)" This reverts commit cbb032a. * Revert "[#408] [모임 상세] 게시글 컴포넌트 (#429)" This reverts commit 2277b0d. * Revert "[#404][독서모임] 모임 검색 컴포넌트 (#419)" This reverts commit 281beee. * Revert "[#418] Avatar 컴포넌트 (#420)" This reverts commit 51d471e. * Revert "[#406] [모임 상세] 멤버 목록 컴포넌트 (#424)" This reverts commit 199a234. * Revert "[#399] Toast 컴포넌트 (#402)" This reverts commit 9333f87. * Revert "[#405] [레이아웃] 공통 레이아웃 (#421)" This reverts commit fb8d8d6. * Revert "[#398] RadioButton 컴포넌트 (#400)" This reverts commit 9c8bdc2. * Revert "[#413] Issue 템플릿에 v1.0 라벨 추가 (#417)" This reverts commit facb746. * Revert "[#363] BottomActionButton 컴포넌트 (#395)" This reverts commit a653d3b. * Revert "[#366] BottomSheet 컴포넌트 (#394)" This reverts commit a43dea4. * Revert "[#364] Badge 컴포넌트 (#396)" This reverts commit 86edc76. * Revert "[#362] TopNavigation 컴포넌트 리팩터링 (#393)" This reverts commit 55a6b98. * Revert "[#361] BottomNavigation 컴포넌트 (#392)" This reverts commit d7d8ca6. * Revert "[#388] Input, Select 컴포넌트 에러 처리 (#389)" This reverts commit f5bf5ef. * Revert "[#390] storybook snippet 작성 (#391)" This reverts commit 97984a7. * Revert "[#365] Modal 컴포넌트 (#387)" This reverts commit 8e931fc. * Revert "[#367] Switch 컴포넌트 (#386)" This reverts commit e1b1ae9. * Revert "[#382] Assets 정리 (#384)" This reverts commit 182def7. * Revert "[#383] Select 컴포넌트 (#385)" This reverts commit 7c189bc. * Revert "[#357] TopHeader UI 컴포넌트 및 스토리북 작성 (#379)" This reverts commit 4dfbcc8. * Revert "[#358] TopNavigation 컴포넌트 (#378)" This reverts commit 41f8f99. * Revert "[#360] Input 컴포넌트 작성 (#380)" This reverts commit e28792d. * Revert "[#359] Button 컴포넌트 (#381)" This reverts commit 6b84755. * Revert "[#376] Storybook 설정 및 GlobalTheme, Font 수정 (#377)" This reverts commit 3a7a9e6. * Revert "[#374] Tailwind 클래스를 정렬하기 위한 Prettier 플러그인 추가 (#375)" This reverts commit e365160. * Revert "[#372] Theme, GlobalStyle, Font 세팅 (#373)" This reverts commit 4f7df42. * Revert "[#370] Storybook & Headless UI 추가 (#371)" This reverts commit 7ad8aef.
구현 내용
스크린샷
pr 포인트
Help
관련 이슈