Skip to content

Commit

Permalink
Merge pull request #98 from Team-Remini/feat/#97
Browse files Browse the repository at this point in the history
feat: 버튼 클릭 추가
  • Loading branch information
candosh authored Dec 19, 2023
2 parents fcbb08d + 0ac5718 commit 9a13993
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file added src/img/UI/editFilled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/pages/Complete/CompleteWriting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import filledHeart from "../../img/UI/filledHeart.png";
import emptyHeart from "../../img/UI/emptyHeart.png";
import sharebtn from "../../img/UI/Ic_Share.png";
import editbtn from "../../img/UI/edit.png";
import editFilledbtn from "../../img/UI/editFilled.png";
import deletebtn from "../../img/UI/delete.png";
import ShareModal from "../../components/Modal/ShareModal";
import DeleteModal from "../../components/Modal/DeleteModal";
Expand All @@ -41,6 +42,7 @@ function CompleteWriting() {
const [showShareModal, setShowShareModal] = useState(false);
const [showDeleteModal, setShowDeleteModal] = useState(false);
const [isEditMode, setIsEditMode] = useState(false);
const [isEditClicked, setIsEditClicked] = useState(false);

const fetchRetrospective = async () => {
try {
Expand Down Expand Up @@ -76,6 +78,7 @@ function CompleteWriting() {

const handleEditClick = () => {
setIsEditMode(true);
setIsEditClicked(!isEditClicked);
};

//type 값에 맞는 랜더링
Expand Down Expand Up @@ -184,8 +187,11 @@ function CompleteWriting() {
{/* 유저의 글에만 보임: 수정, 삭제 */}
{retrospective && retrospective.owner && (
<>
<div className="editbtn">
<img src={editbtn} alt="edit" onClick={handleEditClick} />
<div className="editbtn" onClick={handleEditClick}>
<img
src={isEditClicked ? editFilledbtn : editbtn}
alt="edit"
/>
</div>
<div className="deletebtn" onClick={handleDeleteClick}>
<img src={deletebtn} alt="delete" />
Expand Down

0 comments on commit 9a13993

Please sign in to comment.