diff --git a/frontend/components/applicant/applicantNode/comment/BlurredComment.component.tsx b/frontend/components/applicant/applicantNode/comment/BlurredComment.component.tsx new file mode 100644 index 00000000..272a84d2 --- /dev/null +++ b/frontend/components/applicant/applicantNode/comment/BlurredComment.component.tsx @@ -0,0 +1,9 @@ +const BlurredComment = () => { + return ( +
+ 자신의 댓글만 조회할 수 있습니다. +
+ ); +}; + +export default BlurredComment; diff --git a/frontend/components/applicant/applicantNode/comment/CommentDetail.component.tsx b/frontend/components/applicant/applicantNode/comment/CommentDetail.component.tsx index 61485cf3..b275f695 100644 --- a/frontend/components/applicant/applicantNode/comment/CommentDetail.component.tsx +++ b/frontend/components/applicant/applicantNode/comment/CommentDetail.component.tsx @@ -3,6 +3,7 @@ import { useState } from "react"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import ApplicantCommentEditorOrViewer from "./EditorOrViewer.component"; +import BlurredComment from "./BlurredComment.component"; import { deleteComment } from "@/src/apis/comment"; import { postCommentsLike } from "@/src/apis/comment"; import Icon from "@/components/common/Icon"; @@ -34,7 +35,7 @@ const CommentDeleteButton = ({ return ; }; -interface ApplicantCommentReq { +interface ApplicantCommentRes { id: string; content: string; createdAt: string; @@ -42,10 +43,11 @@ interface ApplicantCommentReq { isLike: boolean; likeCount: number; canEdit: boolean; + isBlurred: boolean; } interface ApplicantCommentDetailProps { - comment: ApplicantCommentReq; + comment: ApplicantCommentRes; cardId: number; generation: string; } @@ -78,29 +80,39 @@ const ApplicantCommentDetail = ({ {new Date(+comment.createdAt).toLocaleDateString()} - - - {comment.canEdit && ( -
- -
- + ) : ( + <> + -
+ {comment.canEdit && ( +
+ +
+ +
+ )} + )} ); diff --git a/frontend/src/apis/comment/index.ts b/frontend/src/apis/comment/index.ts index 713a1281..f77c8e41 100644 --- a/frontend/src/apis/comment/index.ts +++ b/frontend/src/apis/comment/index.ts @@ -8,6 +8,7 @@ export interface CommentRes { isLike: boolean; likeCount: number; canEdit: boolean; + isBlurred: boolean; } export interface CommentReq {