From ae49aa7c0017809b3da141f73a1c835c3b6efeb1 Mon Sep 17 00:00:00 2001 From: Photogrammer <81505228+JuneParkCode@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:15:31 +0900 Subject: [PATCH] =?UTF-8?q?[fix]:=20=ED=95=B4=EC=8B=9C=ED=83=9C=EA=B7=B8?= =?UTF-8?q?=20=EC=9E=98=EB=A6=BC=20=ED=98=84=EC=83=81=20=ED=95=B4=EC=86=8C?= =?UTF-8?q?=20(#246)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 한글의 경우 더 넓은 크기를 차지하여 6 -> 7 --- 42manito/src/components/Mentor/Card.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/42manito/src/components/Mentor/Card.tsx b/42manito/src/components/Mentor/Card.tsx index ee6dd77b..578e8d62 100644 --- a/42manito/src/components/Mentor/Card.tsx +++ b/42manito/src/components/Mentor/Card.tsx @@ -24,7 +24,7 @@ const sliceHashtags = (hashtags: HashtagResponseDto[], limit: number) => { if (acc + hashtag.name.length > limit) { continue; } - acc += hashtag.name.length + 6; // 최적화된 값임.. 6은 #{} 의 길이 + acc += hashtag.name.length + 7; // 최적화된 값임.. 6은 #{} 의 길이 slicedHashtags.push(hashtag); } return slicedHashtags; @@ -34,7 +34,7 @@ const MentorCard = ({ data }: props) => { const dispatch = useAppDispatch(); const { nickname, profileImage } = data.user; const { shortDescription, hashtags } = data; - const slicedHashtags = sliceHashtags(hashtags, 31); + const slicedHashtags = sliceHashtags(hashtags, 32); const openMentorModal = (data: MentorProfileDto) => { dispatch(CurrMentorSlice.actions.deleteMentor()); dispatch(CurrMentorSlice.actions.setMentor(data));