Skip to content

Commit

Permalink
Ver 1.0.2
Browse files Browse the repository at this point in the history
[fix]: 해시태그 잘림 현상 해소 (#246)
  • Loading branch information
JuneParkCode authored Oct 6, 2023
2 parents 9ad3063 + ae49aa7 commit 39ff773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 42manito/src/components/Mentor/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down

0 comments on commit 39ff773

Please sign in to comment.