diff --git a/src/components/ProfileInfo.tsx b/src/components/ProfileInfo.tsx index bc371e90..be0db015 100644 --- a/src/components/ProfileInfo.tsx +++ b/src/components/ProfileInfo.tsx @@ -1,5 +1,4 @@ -import { Text, TextDivider, Box, Flex, ImageView, PNGDefaultProfileInfo36 } from 'concept-be-design-system'; -import { Fragment } from 'react'; +import { Text, Box, Flex, ImageView, PNGDefaultProfileInfo36 } from 'concept-be-design-system'; import useNavigatePage from '../pages/hooks/useNavigatePage'; @@ -7,12 +6,12 @@ interface Props { memberId: number; imageUrl: string; nickname: string; - skillList: string[]; + mainSkill: string; } // TODO: 프로필 이미지 사진 오류 시 보여줄 기본 프로필 이미지 사진 URL -const ProfileInfo = ({ memberId, imageUrl, nickname, skillList }: Props) => { +const ProfileInfo = ({ memberId, imageUrl, nickname, mainSkill }: Props) => { const { goProfilePage } = useNavigatePage(); return ( @@ -25,14 +24,9 @@ const ProfileInfo = ({ memberId, imageUrl, nickname, skillList }: Props) => { {nickname} - {skillList.map((skill, idx) => ( - - - {skill} - - {idx !== skillList.length - 1 && } - - ))} + + {mainSkill} + diff --git a/src/pages/FeedDetail/FeedDetail.page.tsx b/src/pages/FeedDetail/FeedDetail.page.tsx index 8827c30b..b89201d0 100644 --- a/src/pages/FeedDetail/FeedDetail.page.tsx +++ b/src/pages/FeedDetail/FeedDetail.page.tsx @@ -22,7 +22,7 @@ const FeedDetailPage = () => { memberId, imageUrl, nickname, - skillList, + mainSkill, title, date, introduce, @@ -67,7 +67,7 @@ const FeedDetailPage = () => { - +
diff --git a/src/pages/FeedDetail/components/Comment.tsx b/src/pages/FeedDetail/components/Comment.tsx index c1de6765..22a565c4 100644 --- a/src/pages/FeedDetail/components/Comment.tsx +++ b/src/pages/FeedDetail/components/Comment.tsx @@ -7,7 +7,6 @@ import ModifyDropdown from './ModifyDropdown'; import Recomment from './Recomment'; import WriteRecomment from './WriteRecomment'; import useConfirm from '../../../hooks/useConfrim'; -import { MemberSkills } from '../../Profile/types'; import { get999PlusCount } from '../../utils'; import useDeleteCommentMutation from '../hooks/mutations/useDeleteComment'; import useFocusEditComment from '../hooks/useFocusEditComment'; @@ -19,7 +18,6 @@ interface Props { feedId: string; myImageUrl: string; myNickname: string; - mySkillList: MemberSkills[]; comment: CommentParentResponse; } @@ -33,7 +31,7 @@ const Comment = ({ nickname, profileImageUrl, createdAt, - memberSkills, + memberMainSkill, content, likesCount, commentCount, @@ -91,7 +89,7 @@ const Comment = ({ memberId={memberId} imageUrl={profileImageUrl} nickname={nickname} - skillList={memberSkills} + mainSkill={memberMainSkill} createdAt={createdAt} owner={owner} /> diff --git a/src/pages/FeedDetail/components/CommentProfileInfo.tsx b/src/pages/FeedDetail/components/CommentProfileInfo.tsx index be230507..a357e18d 100644 --- a/src/pages/FeedDetail/components/CommentProfileInfo.tsx +++ b/src/pages/FeedDetail/components/CommentProfileInfo.tsx @@ -1,6 +1,5 @@ import styled from '@emotion/styled'; import { Box, Flex, ImageView, PNGDefaultProfileInfo36, Text, TextDivider } from 'concept-be-design-system'; -import { Fragment } from 'react'; import { formatCommentDate } from '../../Feed/utils/formatCommentDate'; import useNavigatePage from '../../hooks/useNavigatePage'; @@ -9,12 +8,12 @@ interface Props { memberId: number; imageUrl: string; nickname: string; - skillList: string[]; + mainSkill: string; createdAt: string; owner: boolean; } -const CommentProfileInfo = ({ memberId, imageUrl, nickname, skillList, createdAt, owner }: Props) => { +const CommentProfileInfo = ({ memberId, imageUrl, nickname, mainSkill, createdAt, owner }: Props) => { const { goProfilePage } = useNavigatePage(); const onClickProfileImage = () => { @@ -33,14 +32,10 @@ const CommentProfileInfo = ({ memberId, imageUrl, nickname, skillList, createdAt {nickname} - {skillList.map((skill) => ( - - - {skill} - - - - ))} + + {mainSkill} + + {formatCommentDate(createdAt)} diff --git a/src/pages/FeedDetail/components/Comments.tsx b/src/pages/FeedDetail/components/Comments.tsx index 8502e37b..d4d9ab53 100644 --- a/src/pages/FeedDetail/components/Comments.tsx +++ b/src/pages/FeedDetail/components/Comments.tsx @@ -15,7 +15,7 @@ interface Props { const Comments = ({ feedId }: Props) => { const { comments, fetchNextPage } = useCommentsQuery(feedId); - const { profileImageUrl: myImageUrl, nickname: myNickname, skills: mySkillList } = useMemberInfoQuery(getUserId()); + const { profileImageUrl: myImageUrl, nickname: myNickname } = useMemberInfoQuery(getUserId()); const intersectionRef = useRef(null); useCommentInfiniteFetch(intersectionRef, fetchNextPage); @@ -26,13 +26,7 @@ const Comments = ({ feedId }: Props) => { {comments.length > 0 ? ( comments.map((comment, idx) => ( - + {idx !== comments.length - 1 ? : <>} )) diff --git a/src/pages/FeedDetail/components/Recomment.tsx b/src/pages/FeedDetail/components/Recomment.tsx index f11fb795..b3f0e871 100644 --- a/src/pages/FeedDetail/components/Recomment.tsx +++ b/src/pages/FeedDetail/components/Recomment.tsx @@ -27,7 +27,7 @@ const Recomment = ({ childCommentId, profileImageUrl, nickname, - memberSkills, + mainSkill, content, likesCount, owner, @@ -78,7 +78,7 @@ const Recomment = ({ memberId={memberId} imageUrl={profileImageUrl} nickname={nickname} - skillList={memberSkills} + mainSkill={mainSkill} createdAt={createdAt} owner={owner} /> diff --git a/src/pages/FeedDetail/types/index.ts b/src/pages/FeedDetail/types/index.ts index 1631f865..9582650c 100644 --- a/src/pages/FeedDetail/types/index.ts +++ b/src/pages/FeedDetail/types/index.ts @@ -2,7 +2,7 @@ export interface FeedDetailResponse { memberId: number; imageUrl: string; nickname: string; - skillList: string[]; + mainSkill: string; title: string; date: string; introduce: string; @@ -25,7 +25,7 @@ export interface CommentParentResponse { parentCommentId: string; nickname: string; profileImageUrl: string; - memberSkills: string[]; + memberMainSkill: string; content: string; createdAt: string; likesCount: number; @@ -41,7 +41,7 @@ export interface CommentChildResponse { childCommentId: string; nickname: string; profileImageUrl: string; - memberSkills: string[]; + mainSkill: string; content: string; createdAt: string; likesCount: number;