Skip to content

Commit

Permalink
[#24] api: 글 수정 api 연결중
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Apr 10, 2024
1 parent be9cf13 commit e43f862
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/read/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ function ReadPage() {
}
};

// [api] 글 수정
const handlePostPatch = (event: React.MouseEvent<HTMLDivElement>) => {
// const isConfirmed = window.confirm("글을 삭제하시겠습니까?");
// if (isConfirmed) {
// deleteDiary(pathname);
// router.back();
// }
};

// [api] 로그인한 유저 정보 get 요청
useEffect(() => {
const checkOwner = async () => {
Expand Down Expand Up @@ -124,7 +133,12 @@ function ReadPage() {
{owner ? (
<>
<div className={styles.postBtns}>
<div className={styles.postEditBtn}>수정</div>
<div
className={styles.postEditBtn}
onClick={handlePostPatch}
>
수정
</div>
<div
className={styles.postDelBtn}
onClick={handlePostDel}
Expand Down

0 comments on commit e43f862

Please sign in to comment.