-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 로고 리랜더링 수정 #87
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
Conversation
입력시 로고 불필요하게 리랜더링되어서 수정
Walkthrough이 풀 리퀘스트는 로그인 및 회원가입 페이지의 헤더 컴포넌트를 리팩토링하는 작업을 포함합니다. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/app/login/page.tsx (1)
9-9: LoginHeader 적용으로 통합 헤더 구성
로고와 문구를 하나의 컴포넌트로 묶음으로써 중복 코드를 줄이고 유지보수를 쉽게 만들었습니다. i18n 적용을 고려한다면, 텍스트를 별도 관리하는 방안도 검토해주세요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/app/login/page.tsx(1 hunks)src/app/members/page.tsx(1 hunks)src/components/common/auth/logo.tsx(2 hunks)
🔇 Additional comments (7)
src/app/members/page.tsx (1)
9-9: 로고와 폼의 직관적 배치
로고 아래에 바로 회원가입 폼을 배치하여 UI 구성이 간결해졌습니다. 다만 로고 주변 여백이나 접근성 측면에서도 확인이 필요합니다.
src/app/login/page.tsx (1)
1-1: LoginHeader 컴포넌트로의 import 변경
Logo 대신 LoginHeader를 가져와 코드 구조를 분명히 했습니다. 앞으로 다른 페이지에서도 동일한 Header 형식을 재사용할 가능성이 높아 보입니다.
src/components/common/auth/logo.tsx (5)
1-2: 클라이언트 전용 코드 지정
이 구문("use client")은 브라우저 환경에서만 동작하게 하므로, SSR이 필요한 경우 주의가 필요합니다. 현재 구조에서는 적절해 보입니다.
5-5: React.memo 임포트 확인
리렌더링 최적화에 유용하므로, 코드 전반에서 memo가 필요한 다른 컴포넌트도 함께 점검해보세요.
Line range hint 7-16: Logo 컴포넌트의 접근성 점검
Link와 Image에 aria-label, alt 등을 적절히 설정하여 스크린 리더 사용자를 배려한 점이 눈에 띕니다. CSS 클래스 네이밍도 직관적입니다.
18-25: LoginHeader 컴포넌트로 로고 및 헤딩 통합
로고와 안내 헤딩을 하나의 컴포넌트로 구성하여 UI를 일관성 있게 유지하며, 메모화가 가능해 성능 이점을 얻습니다.
27-27: 메모를 통한 불필요 렌더링 방지
export default memo(LoginHeader)는 prop 변경이 없을 때 렌더링을 최적화하므로, 성능에 긍정적 영향이 있을 것으로 예상됩니다.
cindycho0423
left a comment
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.
메모이제이션 조아용~~👍🏻
| return ( | ||
| <div className="mb-15 flex flex-col items-center justify-center gap-13"> | ||
| <Logo /> | ||
| <h1 className="mt-20 text-18-700">로그인후 서비스를 이용해주세요</h1> |
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.
h1 태그랑 먼가 안맞는것 같은데..! h 태그는 보통 제목에 쓰는 것 같아소,, div 나 p 태그..? 가 낫지 않을까??
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.
수정하겠습니당!
입력시 로고 불필요하게 리랜더링되어서 수정
#️⃣ 이슈
📝 작업 내용
로고 리랜더링 되는거 수정하고 컴포넌트들 메모이제이션했습니다
📸 스크린샷
✅ 체크 리스트
👩💻 공유 포인트 및 논의 사항
Summary by CodeRabbit
LoginHeader컴포넌트로 변경되었습니다.