Skip to content

Commit

Permalink
feat: 공고 수정 버튼 QA 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyo-4 committed May 21, 2024
1 parent b05c9e6 commit 101c1cc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/ApplyEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ApplyEditPage: React.FC = () => {
{ question: "", answer: "" },
]); //문항 데이터
const [editing, setEditing] = useState(false); //수정중 여부
const [completed, setCompleted] = useState(""); //작성 완료
const [completed, setCompleted] = useState<string>(""); //작성 완료
const [isAllFilled, setIsAllFilled] = useState(false); // 문항이 빈칸이 없는지 검사

const [detailId, setDetailId] = useRecoilState<number | string>(detailStore); //경험의 고유 id(0이 아니여야함)
Expand Down Expand Up @@ -124,6 +124,8 @@ const ApplyEditPage: React.FC = () => {
//저장기능
} else if (!editing && !completed) {
setEditing(!editing);
} else if (!editing && completed === "작성중") {
setEditing(!editing);
}
};

Expand Down Expand Up @@ -293,11 +295,12 @@ const ApplyEditPage: React.FC = () => {
>
저장
</SaveButton>
) : completed === "작성완료" ? (
<EditButton iscanEdit={true} onClick={handleEditButton}>
수정
</EditButton>
) : (
<EditButton
iscanEdit={completed === "작성중"}
onClick={handleEditButton}
>
<EditButton iscanEdit={false} onClick={handleEditButton}>
수정
</EditButton>
)}
Expand Down

0 comments on commit 101c1cc

Please sign in to comment.