Skip to content
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

Merged
merged 9 commits into from
Aug 30, 2023

Conversation

kangju2000
Copy link
Contributor

@kangju2000 kangju2000 commented Aug 29, 2023

💡 왜 PR을 올렸나요?

💁 무엇이 어떻게 바뀌나요?

  1. 모임 멤버 조회 페이지 리팩토링
  2. Applies api 추가 및 연결
  3. 지원서 Swiper 구현
  4. 모임 상세 페이지에서 모임 설명 6줄 이상 시 더보기/접기 버튼 표시 (useShowMore 훅 구현)

💬 리뷰어분들께

@kangju2000 kangju2000 self-assigned this Aug 29, 2023
@github-actions github-actions bot added the Feature 기존 페이지/컴포넌트에서 기능을 추가한 경우 label Aug 29, 2023
@github-actions
Copy link

Labeler가 제목과 설명에 있는 특별한 텍스트와 일치하는 레이블을 적용했습니다.
Label을 검토하고 필요한 변경 사항을 적용해 주세요.

Copy link
Member

@guesung guesung left a 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({
Copy link
Member

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를 넘겨주면 어떨까요 ?

Comment on lines +22 to +28
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]);
Copy link
Member

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}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1)

onClick위치가 Image가 아니라, div전체에 주고 있어요 !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 섹션을 클릭했을 때

@kangju2000 kangju2000 merged commit f263c60 into develop Aug 30, 2023
1 check passed
@kangju2000 kangju2000 deleted the feature/281-refactoring-group-member-page branch August 30, 2023 02:51
guesung pushed a commit that referenced this pull request Jul 12, 2024
…-member-page

Feature : 모임 멤버 조회 페이지 리팩토링
guesung pushed a commit that referenced this pull request Jul 17, 2024
…-member-page

Feature : 모임 멤버 조회 페이지 리팩토링
guesung pushed a commit that referenced this pull request Jul 17, 2024
…-member-page

Feature : 모임 멤버 조회 페이지 리팩토링
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature 기존 페이지/컴포넌트에서 기능을 추가한 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactoring] 멤버 상세 페이지 리팩토링 [Feature] 지원서 조회 api 연결
2 participants