From 59a322d5e3f182d3dca6e8940bbe9d53e9497d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=84=ED=98=95=EC=9A=B0?= <96507347+HyeongwooIM@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:54:29 +0900 Subject: [PATCH 1/2] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cde6add..ddaff48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,5 +24,7 @@ jobs: username: ${{ secrets.USER }} script: | cd git/42ence-front + git reset --hard + git fetch git pull pm2 restart npm From f51a988671adbed4625a9c414344c1a59246b0c9 Mon Sep 17 00:00:00 2001 From: ppparkta Date: Mon, 26 Jun 2023 18:19:06 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=96=B4=EC=83=89=ED=95=9C=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/myPage/Comments.tsx | 5 ++++- src/components/myPage/MyPage.tsx | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/myPage/Comments.tsx b/src/components/myPage/Comments.tsx index cc5a124..44cbe6f 100644 --- a/src/components/myPage/Comments.tsx +++ b/src/components/myPage/Comments.tsx @@ -14,6 +14,7 @@ import { StarRating } from "../../hooks/StarRating"; import Modal from "../modal/Modal"; import { modal } from "../../utils/recoil/modal"; import { ConvertTime } from "../../hooks/ConvertTime"; +import { useParams } from "react-router"; export interface CommentProps { comment: Comment; @@ -29,6 +30,8 @@ const Comments = ({ comment, isLikeComment }: CommentProps) => { const [userState, setProfileState] = useRecoilState(profileState); const [isLike, setIsLike] = useState(); const [{ modalName }, setModal] = useRecoilState(modal); + const params = useParams() as { profile: string; intraId: string }; + const intraId = params.intraId; const clickLikeButton = (commentId?: Number, intraId?: String) => { fetch(`${baseUrl}/like.${commentId}/${intraId}`, { @@ -57,7 +60,7 @@ const Comments = ({ comment, isLikeComment }: CommentProps) => { )} {isLikeComment && |} {getTime(comment.update_time)} - {comment.intra_id === userState.intra_id || isLikeComment === false ? ( + {comment.intra_id === userState.intra_id || (isLikeComment === false && intraId === userState.intra_id) ? (