Skip to content

Conversation

@cccwon2
Copy link
Contributor

@cccwon2 cccwon2 commented Dec 14, 2024

마이페이지

  1. 내가 쓴 글 수정
  2. 내가 쓴 댓글 수정

수정 사항

  1. useWidth 훅 추가하여 화면 크기 감지
  2. 화면 크기별 댓글 수 동적 계산:
  • 모바일: 2개 (1열 × 2줄)
  • 태블릿(md): 4개 (2열 × 2줄)
  • 데스크톱(lg: 6개 (3열 × 2줄)
  • 데스크톱 대형(xl): 8개 (4열 × 2줄)
  1. 화면 크기 변경 시 현재 페이지 재조정하는 useEffect 추가
  2. 고정된 COMMENTS_PER_PAGE 상수 제거

결과

  • 화면 크기에 따라 적절한 수의 댓글이 표시됨
  • 항상 2줄로 깔끔하게 정렬됨
  • 화면 크기가 변경되어도 페이지네이션이 자연스럽게 조정됨

내가 쓴 글

스크린샷 2024-12-14 171500

내가 쓴 댓글

스크린샷 2024-12-14 171509

@cccwon2 cccwon2 added the 🔨 Refactor 코드 리팩토링 label Dec 14, 2024
@cccwon2 cccwon2 self-assigned this Dec 14, 2024
@github-actions
Copy link

💄 Storybook: https://673dcf13c9a3a1189a7c6fd4-kcbkdqpnen.chromatic.com/ # Chromatic에서 생성된 Storybook URL
🕖 Update: 2024년 12월 14일 17시 15분 45초 # 현재 시간

Copy link
Collaborator

@hongggyelim hongggyelim left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 👍

Copy link
Collaborator

@yyezzzy yyezzzy left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 ☺️

@yyezzzy yyezzzy merged commit fc60ade into dev Dec 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants