Skip to content

fix: Header title 가운데 정렬#25

Merged
heeeeyong merged 4 commits into
developfrom
feature/signup
Jul 1, 2025
Merged

fix: Header title 가운데 정렬#25
heeeeyong merged 4 commits into
developfrom
feature/signup

Conversation

@heeeeyong

@heeeeyong heeeeyong commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

📝작업 내용

  • Fix: header title이 가운데 정렬되지 않는 문제를 해결했습니다.
  • Chore: rename Header.tsx to TitleHeader.tsx
    서비스 내 헤더가 두 가지 형태로 존재해서 TitleHeader로 명칭을 분리했습니다
  • Chore: Move TitleHeader component to common folder
  • Chore: Move NavBar component to common folder
    TitleHeader, NavBar 컴포넌트를 src/components/common/으로 이동

Summary by CodeRabbit

  • Refactor
    • 공통 헤더 컴포넌트의 이름이 Header에서 TitleHeader로 변경되었습니다.
    • 회원가입 관련 페이지에서 기존 Header 대신 새로운 TitleHeader 컴포넌트를 사용하도록 변경되었습니다.
    • 기능 및 UI에는 영향이 없습니다.

@coderabbitai

coderabbitai Bot commented Jun 30, 2025

Copy link
Copy Markdown

Walkthrough

컴포넌트의 이름이 Header에서 TitleHeader로 변경되었습니다. 이 변경에 따라 관련 페이지 컴포넌트들도 새로운 컴포넌트 이름과 경로를 사용하도록 수정되었습니다. 기능적, UI, props의 변화는 없습니다.

Changes

파일(들) 변경 요약
src/components/common/TitleHeader.tsx 컴포넌트 및 기본 export 이름을 Header에서 TitleHeader로 변경
src/pages/signup/SignupDone.tsx, src/pages/signup/SignupGenre.tsx, src/pages/signup/SignupNickname.tsx Header 컴포넌트 import 및 사용을 TitleHeader로 변경, 경로 수정, props는 동일하게 유지

Suggested labels

🎨 Html&css

Suggested reviewers

  • ho0010

Poem

🐇
이름이 바뀌었네, Header에서 TitleHeader로,
토끼가 뛰듯 경로도 살짝 옮겼죠.
기능은 그대로, 모습도 그대로,
코드 속 작은 변화,
토끼는 방긋 웃으며
“이름이 더 멋져졌군!”
🥕

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
src/components/common/TitleHeader.tsx (1)

38-53: Emotion이 active prop을 그대로 DOM에 주입합니다 – 경고 발생 가능

Emotion(@emotion/styled)은 기본적으로 전달받은 props를 그대로 DOM attribute로 전달합니다.
active는 HTML <div>에서 유효하지 않은 속성이므로, 브라우저 콘솔에 “Received unknown prop ‘active’” 경고가 뜹니다.

-const NextButton = styled.div<{ active: boolean }>`
+const NextButton = styled('div', {
+  // active prop을 DOM으로 전달하지 않도록 필터링
+  shouldForwardProp: prop => prop !== 'active',
+})<{ active: boolean }>`
   cursor: ${({ active }) => (active ? 'pointer' : 'default')};
   ...
-  background: ${({ active }) => (active ? '#6868FF' : '#888')};
+  background: ${({ active }) => (active ? '#6868FF' : '#888')};

또는 prop 이름을 $active로 변경해도 됩니다.
DOM 경고를 사전에 차단해 주세요.

🧹 Nitpick comments (4)
src/components/common/TitleHeader.tsx (2)

40-44: align-items 속성이 효과가 없습니다

align-items는 Flex 컨테이너일 때만 동작합니다.
NextButtondisplay: flex; justify-content: center; 정도를 추가하지 않으면 텍스트가 수직 중앙에 오지 않습니다.


55-62: 타이틀 정확한 가운데 정렬이 보장되지 않음

justify-content: space-between 방식은 좌·우 요소 폭이 동일할 때만 시각적 중앙 정렬이 맞춰집니다.
우측 버튼이 없거나(폭 0) 아이콘 크기가 좌측과 다르면 타이틀이 치우칠 수 있습니다.
position: absolute; left: 50%; transform: translateX(-50%); 패턴을 고려해 보세요.

src/pages/signup/SignupNickname.tsx (1)

4-4: 컴포넌트 alias가 실제 이름과 달라 가독성이 떨어집니다

TitleHeaderHeader라는 이름으로 import-alias 하여 사용하고 있습니다.
추후 유지보수 시 혼선을 줄이기 위해 변수명도 TitleHeader로 맞추는 편이 낫습니다.

-import Header from '../../components/common/TitleHeader';
+import TitleHeader from '../../components/common/TitleHeader';
 ...
-      <Header
+      <TitleHeader
         title="설정 1/2"
         ...
       />

Also applies to: 30-36

src/pages/signup/SignupDone.tsx (1)

19-22: 타이틀이 전달되지 않아 빈 요소가 렌더링됩니다

TitleHeadertitle prop이 없더라도 <div className="title">를 출력하므로, 현재 빈 div가 DOM에 남습니다.

  1. 타이틀을 명시적으로 전달하거나
  2. title이 없으면 해당 div를 렌더링하지 않도록 TitleHeader를 개선해 주세요.

예시:

-      <TitleHeader
-        leftIcon={<img src={leftarrow} alt="뒤로가기" />}
-        onLeftClick={handleBackClick}
-      />
+      <TitleHeader
+        leftIcon={<img src={leftarrow} alt="뒤로가기" />}
+        title="회원가입 완료"
+        onLeftClick={handleBackClick}
+      />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e89b20 and 5e04ed3.

📒 Files selected for processing (4)
  • src/components/common/TitleHeader.tsx (2 hunks)
  • src/pages/signup/SignupDone.tsx (2 hunks)
  • src/pages/signup/SignupGenre.tsx (2 hunks)
  • src/pages/signup/SignupNickname.tsx (1 hunks)
🔇 Additional comments (1)
src/pages/signup/SignupGenre.tsx (1)

38-45: 전반적으로 문제 없음 – 변경 사항 승인

공통 헤더로의 교체가 올바르게 이루어졌습니다.

@heeeeyong heeeeyong merged commit 4c42f1b into develop Jul 1, 2025
1 check passed
@heeeeyong heeeeyong added the 🎨 Html&css 마크업 & 스타일링 label Jul 2, 2025
@heeeeyong heeeeyong deleted the feature/signup branch July 10, 2025 09:34
@heeeeyong heeeeyong self-assigned this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Html&css 마크업 & 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant