File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/domains/shared/components/comment Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type Props = {
1515 onLoadMore ?: ( lastCommentId : number ) => void ; // ← 무한스크롤 콜백
1616 isEnd ?: boolean ;
1717 isLoading : boolean ;
18+ myPage : boolean ;
1819} ;
1920
2021function CommentList ( {
@@ -24,6 +25,7 @@ function CommentList({
2425 onDeleteComment,
2526 onLoadMore,
2627 isEnd,
28+ myPage = false ,
2729} : Props ) {
2830 const parentRef = useRef < HTMLDivElement | null > ( null ) ;
2931 const [ editCommentId , setEditCommentId ] = useState < number | null > ( null ) ;
@@ -107,6 +109,7 @@ function CommentList({
107109 commentTime = { createdAt }
108110 isMyComment = { isMyComment }
109111 isEditing = { isEditing }
112+ myPage = { myPage }
110113 onSubmitEdit = { ( ) => {
111114 const updatedContent = editedContentMap [ commentId ] ;
112115 if ( ! updatedContent ) return ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ type Props = {
1111 onSubmitEdit : ( ) => void ;
1212 onDelete : ( ) => void ;
1313 isMyComment : boolean | null ;
14+ myPage : boolean ;
1415} ;
1516
1617function CommentTitle ( {
@@ -22,6 +23,7 @@ function CommentTitle({
2223 onSubmitEdit,
2324 onDelete,
2425 isMyComment,
26+ myPage,
2527} : Props ) {
2628 return (
2729 < div className = "flex items-center justify-between" >
@@ -30,7 +32,7 @@ function CommentTitle({
3032 < span className = "md:text-sm text-[11px]" > |</ span >
3133 < p className = "md:text-sm text-[11px] text-gray" > { elapsedTime ( commentTime ) } </ p >
3234 </ div >
33- { isMyComment && (
35+ { isMyComment && ! myPage && (
3436 < EditDelete
3537 use = "comment"
3638 onSubmitEdit = { onSubmitEdit }
You can’t perform that action at this time.
0 commit comments