-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 저장한 책 또는 참여 중 모임의 책 조회 API 연동 #121
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9fc233c
feat: 저장한 책 및 참여 중 모임 책 조회 API 연동 완료
ljh130334 945328e
style: 북 리스트 갭 제거 및 구분선 추가
ljh130334 f493da8
feat: 빈 상태 UI 개선 및 책 신청하기 네비게이션 추가
ljh130334 d295af0
refactor: 임시방편 forceEmpty 코드 제거 및 정리
ljh130334 35f2288
refactor: 책 신청 경로 수정
ljh130334 05c58a0
refactor: BookSearchBottomSheet 컴포넌트 분리 및 구조 개선
ljh130334 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { apiClient } from '../index'; | ||
|
|
||
| // 저장한 책 정보 타입 | ||
| export interface SavedBook { | ||
| bookId: number; | ||
| bookTitle: string; | ||
| authorName: string; | ||
| publisher: string; | ||
| bookImageUrl: string; | ||
| isbn: string; | ||
| } | ||
|
|
||
| // API 응답 데이터 타입 | ||
| export interface SavedBooksData { | ||
| bookList: SavedBook[]; | ||
| } | ||
|
|
||
| // API 응답 타입 | ||
| export interface SavedBooksResponse { | ||
| isSuccess: boolean; | ||
| code: number; | ||
| message: string; | ||
| data: SavedBooksData; | ||
| } | ||
|
|
||
| // 저장한 책 또는 참여 중 모임의 책 조회 | ||
| export const getSavedBooks = async (type: 'saved' | 'joining'): Promise<SavedBooksResponse> => { | ||
| try { | ||
| const response = await apiClient.get<SavedBooksResponse>('/books/selectable-list', { | ||
| params: { | ||
| type: type.toUpperCase(), | ||
| }, | ||
| }); | ||
| return response.data; | ||
| } catch (error) { | ||
| console.error('저장한 책 조회 API 오류:', error); | ||
| throw error; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import { | ||
| BookList as StyledBookList, | ||
| BookItem, | ||
| BookCover, | ||
| BookInfo, | ||
| BookTitle, | ||
| } from './BookSearchBottomSheet.styled'; | ||
|
|
||
| export interface Book { | ||
| id: number; | ||
| title: string; | ||
| author: string; | ||
| cover: string; | ||
| isbn: string; | ||
| } | ||
|
|
||
| interface BookListProps { | ||
| books: Book[]; | ||
| onBookSelect: (book: Book) => void; | ||
| } | ||
|
|
||
| const BookList = ({ books, onBookSelect }: BookListProps) => { | ||
| const handleImageError = (e: React.SyntheticEvent<HTMLImageElement>) => { | ||
| e.currentTarget.style.display = 'none'; | ||
| }; | ||
|
|
||
| return ( | ||
| <StyledBookList> | ||
| {books.map(book => ( | ||
| <BookItem key={book.id} onClick={() => onBookSelect(book)}> | ||
| <BookCover> | ||
| <img src={book.cover} alt={book.title} onError={handleImageError} /> | ||
| </BookCover> | ||
| <BookInfo> | ||
| <BookTitle>{book.title}</BookTitle> | ||
| </BookInfo> | ||
| </BookItem> | ||
| ))} | ||
| </StyledBookList> | ||
| ); | ||
| }; | ||
|
|
||
| export default BookList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
문법 오류: 여분의 중괄호로 인해 스타일 파싱 실패
EmptyText의 color 속성에 불필요한
};가 포함되어 있습니다. 이대로면 CSS-in-JS 파싱 오류가 발생할 수 있습니다. 즉시 수정이 필요합니다.선택: 색 값을 토큰으로 통일하고 싶다면
${colors.grey[200]}사용도 고려해 주세요.📝 Committable suggestion
🤖 Prompt for AI Agents