-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
도서관 사용자 피드백 개선 (OPEN-BETA)
- Loading branch information
Showing
15 changed files
with
120 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
18 changes: 0 additions & 18 deletions
18
apps/member/src/components/library/LibraryBookList/LibraryBookList.tsx
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
apps/member/src/components/library/LibraryBooksSection/LibraryBooksSection.tsx
This file contains 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,37 @@ | ||
import Pagination from '@components/common/Pagination/Pagination'; | ||
import { Section } from '@components/common/Section'; | ||
|
||
import { usePagination } from '@hooks/common/usePagination'; | ||
import { useBooks } from '@hooks/queries/book'; | ||
|
||
import BookCard from '../BookCard/BookCard'; | ||
|
||
const LibraryBooksSection = () => { | ||
const { page, size, handlePageChange } = usePagination(16); | ||
|
||
const { data } = useBooks(page, size); | ||
|
||
return ( | ||
<Section> | ||
<Section.Header | ||
title="둘러보기" | ||
description="소장 도서를 둘러볼 수 있어요" | ||
/> | ||
<Section.Body> | ||
<div className="grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4"> | ||
{data.items.map(({ id, ...rest }) => ( | ||
<BookCard key={id} id={id} {...rest} /> | ||
))} | ||
</div> | ||
<Pagination | ||
className="mt-4 justify-center" | ||
totalItems={data.totalItems} | ||
postLimit={size} | ||
onChange={handlePageChange} | ||
page={page} | ||
/> | ||
</Section.Body> | ||
</Section> | ||
); | ||
}; | ||
export default LibraryBooksSection; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,2 @@ | ||
export * from './useBooks'; | ||
export * from './useBookDetails'; |
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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