Skip to content

Commit

Permalink
Merge pull request #197 from boostcampwm2023/fix/mode-change-error
Browse files Browse the repository at this point in the history
[Fix] 편집 모드 전환 시 모달이 닫히도록 수정
  • Loading branch information
dmson1218 authored Dec 4, 2023
2 parents 5fe6169 + 2058d4c commit c4cd1ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 2 additions & 3 deletions FE/src/components/DiaryModal/DiaryReadModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,16 @@ function DiaryReadModal(props) {
},
);

// TODO: 로딩, 에러 처리 UI 구현
if (isLoading)
return (
<ModalWrapper left='67%' width='40vw' height='65vh' opacity='0.3'>
<ModalWrapper left='50%' width='40vw' height='65vh' opacity='0.3'>
Loading...
</ModalWrapper>
);

if (isError)
return (
<ModalWrapper left='67%' width='40vw' height='65vh' opacity='0.3'>
<ModalWrapper left='50%' width='40vw' height='65vh' opacity='0.3'>
에러 발생
</ModalWrapper>
);
Expand Down
8 changes: 8 additions & 0 deletions FE/src/pages/StarPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import arrow from "../assets/arrow.svg";
import paint from "../assets/paint.svg";

function StarPage() {
const setDiaryState = useSetRecoilState(diaryAtom);
const [starState, setStarState] = useRecoilState(starAtom);

return (
Expand Down Expand Up @@ -55,6 +56,13 @@ function StarPage() {
}));
}}
rightEvent={() => {
setDiaryState((prev) => ({
...prev,
isCreate: false,
isRead: false,
isUpdate: false,
isDelete: false,
}));
setStarState((prev) => ({
...prev,
mode: "stella",
Expand Down

0 comments on commit c4cd1ce

Please sign in to comment.