Skip to content
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

Feat/#129 | 수정사항 반영 #130

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bookduck/src/components/LibraryPage/BookListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const BookListPage = ({ view }) => {
switch (status) {
case "NOT_STARTED":
return "읽고 싶어요";
case "READING,":
case "READING":
return "읽고 있어요";
case "FINISHED":
return "다 읽었어요";
Expand Down
3 changes: 2 additions & 1 deletion bookduck/src/components/common/EditBookListView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const EditBookListView = ({
edit,
addBook,
rating,
initState,
}) => {
return (
<div
Expand Down Expand Up @@ -57,7 +58,7 @@ const EditBookListView = ({
{addBook && (
<div className="flex">
<span className="text-c1 text-gray-500 cursor-pointer">
읽고 싶어요
{initState}
</span>
<img src={downArrow} alt="downArrow" />
</div>
Expand Down
19 changes: 18 additions & 1 deletion bookduck/src/pages/LibraryPage/EnterBookCasePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ const EnterBookCasePage = () => {
}
};

const getReadingStatus = (status) => {
switch (status) {
case "NOT_STARTED":
return "읽고 싶어요";
case "READING":
return "읽고 있어요";
case "FINISHED":
return "다 읽었어요";
case "STOPPED":
return "중단했어요";
default:
return "읽고 싶어요";
}
};

const {
data: folderBookListData = { bookList: [] },
isError,
Expand Down Expand Up @@ -205,7 +220,7 @@ const EnterBookCasePage = () => {
folderBookListData.folderBookList.map((book, index) => (
<div key={index}>
<BookListView
register={true}
register={book.isCustom}
bookTitle={book.title}
author={book.author}
edit={true}
Expand Down Expand Up @@ -305,6 +320,7 @@ const EnterBookCasePage = () => {
bookImg={book.imgPath}
rating={book.rating}
isSelected={selectedIndex.includes(index)}
initState={getReadingStatus(book.readStatus)}
/>
</div>
</div>
Expand Down Expand Up @@ -332,6 +348,7 @@ const EnterBookCasePage = () => {
bookImg={book.imgPath}
rating={book.rating}
isSelected={selectedIndex.includes(index)}
initState={getReadingStatus(book.readStatus)}
/>
</div>
</div>
Expand Down