-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature : 모임 멤버 조회 페이지 리팩토링 #282
Feature : 모임 멤버 조회 페이지 리팩토링 #282
Conversation
Labeler가 제목과 설명에 있는 특별한 텍스트와 일치하는 레이블을 적용했습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
import Image from 'next/image'; | ||
|
||
export default function TopSection() { | ||
const { groupId } = useNumberParams<['groupId']>(); | ||
const { contentRef, setShowFullText, shouldShowButton, showFullText } = useShowMore({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4)
setShowFullText
은 boolean값을 true <-> false를 변환해주는 역할밖에 하지 않는 것 같은데, setShowFullText
가 아니라, toggleShowFullText
를 넘겨주면 어떨까요 ?
useEffect(() => { | ||
if (contentRef.current) { | ||
const lineHeight = parseInt(getComputedStyle(contentRef.current).lineHeight, 10); | ||
contentRef.current.style.maxHeight = showFullText ? 'none' : `${lineHeight * maxLines}px`; | ||
contentRef.current.style.overflow = showFullText ? 'visible' : 'hidden'; | ||
} | ||
}, [showFullText, maxLines]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref를 넘겨줌으로써 style등의 DOM 조작을 ref를 생성한 useShowMore
에서 할 수 있군요 ..! 👍👍
|
||
return ( | ||
<section> | ||
<h2 className="pl-4 text-subtitle-3 text-sign-secondary">모임 위치</h2> | ||
<Spacing size={4} /> | ||
<div className="relative rounded-8 bg-gray6"> | ||
<div className="relative rounded-8 bg-gray6" onClick={handleClipboardClick}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p1)
onClick
위치가 Image
가 아니라, div
전체에 주고 있어요 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 섹션을 클릭했을 때
…-member-page Feature : 모임 멤버 조회 페이지 리팩토링
…-member-page Feature : 모임 멤버 조회 페이지 리팩토링
…-member-page Feature : 모임 멤버 조회 페이지 리팩토링
💡 왜 PR을 올렸나요?
💁 무엇이 어떻게 바뀌나요?
💬 리뷰어분들께