Skip to content

Commit

Permalink
fix: 레큐북 뷰 초기 진입 시 붉은 박스가 나타났다 사라지는 이슈 해결 (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jungwoo3490 authored Jan 9, 2025
1 parent b513ff4 commit 16da6b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Detail/components/LecueNoteListContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface LecueNoteListContainerProps {
noteList: NoteType[];
postedStickerList: postedStickerType[];
isEditable: boolean;
setEditableStateFalse: () => void;
setEditableStateTrue: () => void;
bookUuid: string;
bookId: number;
}
Expand All @@ -41,7 +41,7 @@ function LecueNoteListContainer(props: LecueNoteListContainerProps) {
noteList,
postedStickerList,
isEditable,
setEditableStateFalse,
setEditableStateTrue,
bookUuid,
bookId,
} = props;
Expand Down Expand Up @@ -85,8 +85,8 @@ function LecueNoteListContainer(props: LecueNoteListContainerProps) {
postedStickerId: stickerId,
stickerImage: stickerImage,
}));
} else {
setEditableStateFalse();

setEditableStateTrue();
}
}, [location.state, isEditable]);

Expand Down
6 changes: 3 additions & 3 deletions src/Detail/page/DetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function DetailPage() {
: useGetBookDetail(bookUuid);
const postMutation = usePostStickerState(bookUuid);

const setEditableStateFalse = () => {
setIsEditable(false);
const setEditableStateTrue = () => {
setIsEditable(true);
};

return isLoading || postMutation.isLoading ? (
Expand All @@ -39,7 +39,7 @@ function DetailPage() {
bookId={bookDetail.bookId}
bookUuid={bookUuid}
isEditable={isEditable}
setEditableStateFalse={setEditableStateFalse}
setEditableStateTrue={setEditableStateTrue}
noteNum={bookDetail.noteNum}
backgroundColor={bookDetail.bookBackgroundColor}
noteList={bookDetail.noteList}
Expand Down

0 comments on commit 16da6b2

Please sign in to comment.