diff --git a/src/components/epigram/Comment/CommentItem.tsx b/src/components/epigram/Comment/CommentItem.tsx index dd65937c..8d26f189 100644 --- a/src/components/epigram/Comment/CommentItem.tsx +++ b/src/components/epigram/Comment/CommentItem.tsx @@ -4,13 +4,13 @@ import { CommentType } from '@/schema/comment'; import { sizeStyles, textSizeStyles, gapStyles, paddingStyles, contentWidthStyles } from '@/styles/CommentCardStyles'; import getCustomRelativeTime from '@/lib/dateUtils'; import useDeleteCommentMutation from '@/hooks/useDeleteCommentHook'; -import { CommentCardProps } from '@/components/Card/CommentCard'; import { useToast } from '@/components/ui/use-toast'; import { Button } from '@/components/ui/button'; import DeleteAlertModal from '../DeleteAlertModal'; -interface CommentItemProps extends CommentCardProps { +interface CommentItemProps { comment: CommentType; + status?: 'view' | 'edit'; onEditComment: (id: number, content: string, isPrivate: boolean) => void; } diff --git a/src/components/epigram/Comment/CommentList.tsx b/src/components/epigram/Comment/CommentList.tsx index 4546016b..f1cccdc9 100644 --- a/src/components/epigram/Comment/CommentList.tsx +++ b/src/components/epigram/Comment/CommentList.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useRef, useCallback } from 'react'; import { EpigramCommentProps } from '@/types/epigram.types'; import useEpigramCommentsQuery from '@/hooks/useEpigramCommentsQueryHook'; -import CommentItem from './CommentItem'; import NoComment from './NoComment'; +import CommentItem from './CommentItem'; interface CommentListProps extends Omit { onEditComment: (id: number, content: string, isPrivate: boolean) => void; @@ -58,7 +58,7 @@ function CommentList({ epigramId, currentUserId, onEditComment }: CommentListPro {allComments.length > 0 ? ( <> {allComments.map((comment) => ( - + ))}
{isFetchingNextPage &&
더 많은 댓글을 불러오는 중...
}
diff --git a/src/components/epigram/EditEpigram.tsx b/src/components/epigram/EditEpigram.tsx index 84865223..1b7e5f1a 100644 --- a/src/components/epigram/EditEpigram.tsx +++ b/src/components/epigram/EditEpigram.tsx @@ -115,7 +115,7 @@ function EditEpigram({ epigram }: EditEpigramProps) { const handleAlertClose = () => { setIsAlertOpen(false); if (alertContent.title === '수정 완료') { - router.push(`/epigram/${epigram.id}`); + router.push(`/epigrams/${epigram.id}`); } }; @@ -123,7 +123,7 @@ function EditEpigram({ epigram }: EditEpigramProps) { <>
{ - router.push(`/epigram/${epigram}/edit`); + router.push(`/epigrams/${epigram}/edit`); }; const handleDeleteClick = () => { diff --git a/src/pageLayout/Epigram/AddEpigram.tsx b/src/pageLayout/Epigram/AddEpigram.tsx index ab4ff2bd..5738f1d4 100644 --- a/src/pageLayout/Epigram/AddEpigram.tsx +++ b/src/pageLayout/Epigram/AddEpigram.tsx @@ -77,7 +77,7 @@ function AddEpigram() { const handleAlertClose = () => { setIsAlertOpen(false); if (alertContent.title === '등록 완료') { - router.push(`/epigram/${addEpigramMutation.data?.id}`); + router.push(`/epigrams/${addEpigramMutation.data?.id}`); } }; diff --git a/src/pageLayout/Epigram/EpigramComment.tsx b/src/pageLayout/Epigram/EpigramComment.tsx index 81976a3a..36ad5606 100644 --- a/src/pageLayout/Epigram/EpigramComment.tsx +++ b/src/pageLayout/Epigram/EpigramComment.tsx @@ -18,7 +18,8 @@ function EpigramComment({ epigramId, currentUserId, userImage }: EpigramCommentP }; return ( -
+ // NOTE: 댓글부분 height 수정 +

댓글 작성

diff --git a/src/pages/addEpigram.tsx b/src/pages/addEpigram/index.tsx similarity index 100% rename from src/pages/addEpigram.tsx rename to src/pages/addEpigram/index.tsx diff --git a/src/pages/epigram/[id]/edit.tsx b/src/pages/epigrams/[id]/edit.tsx similarity index 100% rename from src/pages/epigram/[id]/edit.tsx rename to src/pages/epigrams/[id]/edit.tsx diff --git a/src/pages/epigram/[id]/index.tsx b/src/pages/epigrams/[id]/index.tsx similarity index 96% rename from src/pages/epigram/[id]/index.tsx rename to src/pages/epigrams/[id]/index.tsx index 0182da5a..9f5424ae 100644 --- a/src/pages/epigram/[id]/index.tsx +++ b/src/pages/epigrams/[id]/index.tsx @@ -22,7 +22,7 @@ function DetailPage() { return (
-
{}} />; +
{}} />