Skip to content

feat: 헤더 공용컴포넌트 구현#23

Merged
thswogh merged 1 commit intomainfrom
20250730_#22_기능추가_공용컴포넌트_헤더_공용컴포넌트
Aug 6, 2025

Hidden character warning

The head ref may contain hidden characters: "20250730_#22_\uae30\ub2a5\ucd94\uac00_\uacf5\uc6a9\ucef4\ud3ec\ub10c\ud2b8_\ud5e4\ub354_\uacf5\uc6a9\ucef4\ud3ec\ub10c\ud2b8"
Merged

feat: 헤더 공용컴포넌트 구현#23
thswogh merged 1 commit intomainfrom
20250730_#22_기능추가_공용컴포넌트_헤더_공용컴포넌트

Conversation

@thswogh
Copy link
Contributor

@thswogh thswogh commented Aug 6, 2025

Summary by CodeRabbit

  • New Features

    • 다양한 헤더 컴포넌트(홈, 피드, 업로드, 검색 등)와 버튼(뒤로가기, 출석, 더보기, 검색, 로고 등)이 추가되었습니다.
    • 출석 일수, 오늘의 키워드 등 새로운 UI 요소가 도입되었습니다.
    • SVG 아이콘(back, more, attend, logo) 지원이 추가되었습니다.
  • Style

    • 앱의 배경색과 주요 색상이 변경되어 더욱 일관된 테마가 적용되었습니다.
    • SafeAreaView의 인셋(edge) 적용 방식이 개선되었습니다.
  • Chores

    • Tailwind CSS 설정에 커스텀 색상이 추가되었습니다.
    • 불필요한 React import가 제거되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 6, 2025

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 20250730_#22_기능추가_공용컴포넌트_헤더_공용컴포넌트

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
  • 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.

Support

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

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 generate unit tests to generate unit tests for 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.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (8)
shared/ui/header/items/Logo.tsx (1)

3-5: 로고 컴포넌트가 간단하고 명확합니다.

Logo 컴포넌트 구현이 깔끔합니다. 다만 크기가 하드코딩되어 있는데, 향후 다양한 크기의 로고가 필요할 경우를 대비해 props로 width와 height를 받을 수 있도록 개선하는 것을 고려해보세요.

-export default function Logo() {
-  return <Icon name="logo" width={34} height={34} />;
+interface LogoProps {
+  width?: number;
+  height?: number;
+}
+
+export default function Logo({ width = 34, height = 34 }: LogoProps) {
+  return <Icon name="logo" width={width} height={height} />;
 }
pages/home/HomePage.tsx (1)

17-18: 헤더 컴포넌트 추가가 잘 되었습니다.

HomeHeader 컴포넌트가 적절히 추가되었고 SafeAreaViewedges 설정도 올바릅니다. 다만 다른 페이지들(AwardsPage 등)은 bg-background-color를 사용하는데 여기서만 bg-white를 사용하고 있습니다. 일관성을 위해 배경색을 통일하는 것을 고려해보세요.

-    <SafeAreaView className="flex-1 bg-white" edges={["left", "right", "bottom"]}>
+    <SafeAreaView className="flex-1 bg-background-color" edges={["left", "right", "bottom"]}>
pages/archive/ArchivePage.tsx (1)

2-2: 사용하지 않는 React import를 제거해주세요.

현재 코드에서 React를 직접 사용하지 않으므로 import를 제거할 수 있습니다.

-import React from "react";
shared/ui/header/variants/SearchHeader.tsx (1)

10-10: TODO 주석을 이슈로 추적하는 것을 고려해보세요.

검색 페이지 UI 수정과 API 연결에 대한 작업이 남아있습니다.

이 TODO를 별도 이슈로 생성하여 추적하시겠습니까?

shared/ui/header/items/BackButton.tsx (1)

9-9: 네비게이션 스택 예외 상황 고려해보세요.

현재 router.back()을 직접 호출하고 있는데, 이전 화면이 없는 경우에 대한 예외 처리를 고려해볼 수 있습니다.

-    <Pressable onPress={() => router.back()} hitSlop={8}>
+    <Pressable onPress={() => router.canGoBack() && router.back()} hitSlop={8}>
shared/ui/header/variants/HomeHeader.tsx (1)

7-7: 선택사항: 유연성 향상을 고려해보세요.

현재 완전히 정적인 구성으로 되어있는데, 향후 다양한 홈 화면 변형이 필요할 경우를 대비해 일부 props를 받을 수 있도록 확장하는 것도 고려해볼 수 있습니다.

예시:

interface HomeHeaderProps {
  onAttendPress?: () => void;
  onSearchPress?: () => void;
}

export default function HomeHeader({ onAttendPress, onSearchPress }: HomeHeaderProps) {
  // ...
}
shared/ui/header/items/AttendButton.tsx (1)

8-8: API 연결 TODO를 추적하기 위한 이슈 생성을 고려해보세요.

현재 하드코딩된 출석일 수를 API로 연결하는 작업이 필요합니다. 이를 별도 이슈로 관리하시겠습니까?

shared/ui/header/items/TodayKeyword.tsx (1)

11-12: 텍스트 크기에 대한 반응형 고려사항을 검토해보세요.

현재 하드코딩된 픽셀 값([8px], [24px]) 대신 Tailwind의 상대적 텍스트 크기 클래스(text-xs, text-2xl 등) 사용을 고려해보시기 바랍니다. 다양한 화면 크기에서 더 일관된 사용자 경험을 제공할 수 있습니다.

-      {dateString && <Text className="text-[8px] text-main-color1">{dateString}</Text>}
-      <Text className="text-[24px] font-semibold text-main-color1">{title}</Text>
+      {dateString && <Text className="text-xs text-main-color1">{dateString}</Text>}
+      <Text className="text-2xl font-semibold text-main-color1">{title}</Text>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c56838 and 85c3926.

⛔ Files ignored due to path filters (5)
  • shared/assets/icons/attend.svg is excluded by !**/*.svg
  • shared/assets/icons/back.svg is excluded by !**/*.svg
  • shared/assets/icons/logo.svg is excluded by !**/*.svg
  • shared/assets/icons/more.svg is excluded by !**/*.svg
  • shared/assets/icons/search.svg is excluded by !**/*.svg
📒 Files selected for processing (20)
  • app/(tabs)/_layout.tsx (1 hunks)
  • pages/archive/ArchivePage.tsx (1 hunks)
  • pages/awards/AwardsPage.tsx (1 hunks)
  • pages/home/HomePage.tsx (2 hunks)
  • pages/profile/ProfilePage.tsx (1 hunks)
  • pages/upload/UploadPage.tsx (1 hunks)
  • shared/assets/icons/index.ts (1 hunks)
  • shared/ui/header/CommonHeader.tsx (1 hunks)
  • shared/ui/header/index.tsx (1 hunks)
  • shared/ui/header/items/AttendButton.tsx (1 hunks)
  • shared/ui/header/items/BackButton.tsx (1 hunks)
  • shared/ui/header/items/Logo.tsx (1 hunks)
  • shared/ui/header/items/MoreButton.tsx (1 hunks)
  • shared/ui/header/items/SearchButton.tsx (1 hunks)
  • shared/ui/header/items/TodayKeyword.tsx (1 hunks)
  • shared/ui/header/variants/FeedHeader.tsx (1 hunks)
  • shared/ui/header/variants/HomeHeader.tsx (1 hunks)
  • shared/ui/header/variants/SearchHeader.tsx (1 hunks)
  • shared/ui/header/variants/UploadHeader.tsx (1 hunks)
  • tailwind.config.js (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (8)
pages/awards/AwardsPage.tsx (1)
app/(tabs)/awards.tsx (1)
  • AwardsTab (4-6)
shared/ui/header/items/Logo.tsx (1)
shared/ui/icon/index.tsx (2)
  • Icon (12-22)
  • IconProps (8-10)
shared/ui/header/items/MoreButton.tsx (1)
shared/ui/icon/index.tsx (2)
  • Icon (12-22)
  • IconProps (8-10)
shared/assets/icons/index.ts (1)
shared/ui/icon/index.tsx (2)
  • IconProps (8-10)
  • Icon (12-22)
shared/ui/header/variants/UploadHeader.tsx (3)
shared/ui/header/CommonHeader.tsx (1)
  • CommonHeader (9-24)
shared/ui/header/items/BackButton.tsx (1)
  • BackButton (5-13)
shared/ui/header/items/TodayKeyword.tsx (1)
  • TodayKeyword (8-15)
shared/ui/header/variants/HomeHeader.tsx (4)
shared/ui/header/CommonHeader.tsx (1)
  • CommonHeader (9-24)
shared/ui/header/items/Logo.tsx (1)
  • Logo (3-5)
shared/ui/header/items/AttendButton.tsx (1)
  • AttendButton (9-16)
shared/ui/header/items/SearchButton.tsx (1)
  • SearchButton (8-14)
shared/ui/header/variants/SearchHeader.tsx (4)
shared/ui/header/CommonHeader.tsx (1)
  • CommonHeader (9-24)
shared/ui/header/items/BackButton.tsx (1)
  • BackButton (5-13)
shared/ui/header/items/TodayKeyword.tsx (1)
  • TodayKeyword (8-15)
shared/ui/header/items/SearchButton.tsx (1)
  • SearchButton (8-14)
shared/ui/header/variants/FeedHeader.tsx (4)
shared/ui/header/CommonHeader.tsx (1)
  • CommonHeader (9-24)
shared/ui/header/items/BackButton.tsx (1)
  • BackButton (5-13)
shared/ui/header/items/TodayKeyword.tsx (1)
  • TodayKeyword (8-15)
shared/ui/header/items/MoreButton.tsx (1)
  • MoreButton (8-14)
🔇 Additional comments (18)
tailwind.config.js (1)

12-18: 새로운 색상 정의가 잘 구성되어 있습니다.

추가된 커스텀 컬러들이 프로젝트의 디자인 시스템에 잘 맞도록 정의되었습니다:

  • main-color1: 메인 녹색 (#195B35)
  • main-color2: 밝은 배경색 (#FFFDF5)
  • background-color: 어두운 배경색 (#232323)

색상 이름이 명확하고 hex 값도 적절합니다.

app/(tabs)/_layout.tsx (1)

15-15: SafeAreaView 설정이 적절합니다.

탭 레이아웃에서 edges={["top"]}만 설정한 것이 올바른 선택입니다. 다른 페이지들과 달리 탭 네비게이션이 하단에 있으므로 상단 safe area만 적용하는 것이 적합합니다. bg-main-color2 배경색도 잘 적용되었습니다.

pages/awards/AwardsPage.tsx (1)

7-7: SafeAreaView 설정이 일관되게 적용되었습니다.

배경색을 bg-background-color로 변경하고 edges={["left", "right", "bottom"]}를 추가한 것이 다른 페이지들과 일관된 패턴을 따르고 있어 좋습니다. 전체 앱의 스타일링 통일성을 향상시키는 변경사항입니다.

pages/profile/ProfilePage.tsx (1)

4-4: 헤더 컴포넌트 구현이 일관되게 잘 적용되었습니다.

공용 헤더 시스템의 SearchHeader를 올바르게 import하고 사용했으며, SafeAreaView의 배경색과 edges 설정도 다른 페이지들과 일관성 있게 적용되었습니다.

Also applies to: 10-11

pages/archive/ArchivePage.tsx (1)

1-1: 헤더 컴포넌트가 일관성 있게 잘 구현되었습니다.

FeedHeader 추가와 SafeAreaView 스타일링이 다른 페이지들과 동일한 패턴으로 적용되어 좋습니다.

Also applies to: 8-9

pages/upload/UploadPage.tsx (1)

3-3: 헤더 컴포넌트 구현이 완벽하게 적용되었습니다.

UploadHeader 추가와 SafeAreaView 스타일링이 다른 페이지들과 동일한 패턴으로 일관성 있게 구현되었습니다.

Also applies to: 7-8

shared/ui/header/items/MoreButton.tsx (1)

1-14: 구현이 우수합니다!

MoreButton 컴포넌트가 다른 헤더 버튼 컴포넌트들과 일관된 패턴을 따르고 있습니다. hitSlop과 아이콘 크기가 BackButton, SearchButton과 동일하게 설정되어 있어 일관성이 유지됩니다.

shared/ui/header/items/BackButton.tsx (1)

1-13: 구현이 깔끔하고 일관성이 좋습니다!

BackButton 컴포넌트가 Expo Router를 적절히 활용하고 있으며, 다른 헤더 버튼들과 일관된 스타일을 유지하고 있습니다.

shared/ui/header/items/SearchButton.tsx (1)

1-14: 완벽한 구현입니다!

SearchButton 컴포넌트가 다른 헤더 버튼 컴포넌트들과 완벽하게 일관된 패턴을 따르고 있습니다. 인터페이스가 깔끔하고 구현이 간결합니다.

shared/ui/header/variants/HomeHeader.tsx (1)

7-20: CommonHeader 조합이 적절합니다!

HomeHeader가 Logo, AttendButton, SearchButton을 적절히 배치하여 홈 화면에 맞는 헤더를 구성하고 있습니다. 우측 버튼들의 flex-row 배치도 적절합니다.

shared/ui/header/variants/UploadHeader.tsx (1)

5-12: 헤더 구조는 적절하지만 하드코딩된 값들을 확인해주세요.

UploadHeader의 CommonHeader 조합과 BackButton 배치는 적절합니다. 하지만 TodayKeyword에 하드코딩된 값들이 우려됩니다.

shared/ui/header/index.tsx (1)

1-5: 잘 구현된 배럴 익스포트 파일입니다.

헤더 컴포넌트들을 중앙화된 방식으로 익스포트하여 다른 곳에서 깔끔하게 임포트할 수 있도록 구성되어 있습니다. 일관된 네이밍 컨벤션을 따르고 있어 좋습니다.

shared/ui/header/items/AttendButton.tsx (1)

9-16: 깔끔하게 구현된 AttendButton 컴포넌트입니다.

  • TypeScript 인터페이스가 적절하게 정의되어 있습니다
  • Pressable을 사용한 터치 인터랙션이 올바르게 구현되었습니다
  • 아이콘과 텍스트의 레이아웃이 잘 구성되어 있습니다
  • Tailwind 클래스를 통한 스타일링이 일관성 있게 적용되었습니다
shared/assets/icons/index.ts (1)

12-15: 새로운 아이콘 익스포트가 기존 패턴과 일관성 있게 추가되었습니다.

헤더 컴포넌트에서 사용될 back, more, attend, logo 아이콘들이 기존의 익스포트 규칙을 따라 적절하게 추가되었습니다. Icon 컴포넌트와의 호환성도 문제없습니다.

shared/ui/header/items/TodayKeyword.tsx (1)

8-15: 잘 구조화된 TodayKeyword 컴포넌트입니다.

  • TypeScript 인터페이스가 명확하게 정의되어 있습니다
  • 조건부 렌더링이 적절하게 구현되었습니다
  • 플렉스 레이아웃과 중앙 정렬이 올바르게 적용되었습니다
  • 재사용 가능한 컴포넌트 설계가 잘 되어 있습니다
shared/ui/header/CommonHeader.tsx (3)

3-7: 잘 설계된 HeaderProps 인터페이스입니다.

옵셔널 ReactNode 프롭들로 유연한 헤더 구성을 가능하게 하는 깔끔한 인터페이스입니다. 익스포트된 인터페이스로 다른 컴포넌트에서도 재사용할 수 있어 좋습니다.


14-20: 레이아웃 일관성을 위한 플레이스홀더 구현이 훌륭합니다.

leftright 프롭이 없을 때 6x6 크기의 플레이스홀더 View를 사용하여 레이아웃의 균형을 유지하는 것이 좋은 UX 접근법입니다. 중앙 섹션의 mt-2는 시각적 균형을 위한 것으로 보입니다.


9-24: 재사용 가능한 헤더 컴포넌트가 잘 구현되었습니다.

  • 슬롯 기반 디자인으로 유연한 헤더 구성이 가능합니다
  • 일관된 스타일링과 적절한 높이/패딩이 적용되었습니다
  • TypeScript 지원이 완벽하게 구현되어 있습니다
  • 모바일 앱에 적합한 고정 높이와 둥근 모서리 디자인입니다

return (
<CommonHeader
left={<BackButton />}
center={<TodayKeyword title="피드 테스트" dateString="2025.08.06" />}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

하드코딩된 테스트 데이터를 동적 데이터로 교체해주세요.

현재 "피드 테스트"와 "2025.08.06" 값이 하드코딩되어 있습니다. 실제 데이터나 props를 통해 전달받도록 개선이 필요합니다.

-export default function FeedHeader() {
+export default function FeedHeader({ title, dateString }: { title?: string; dateString?: string }) {
   return (
     <CommonHeader
       left={<BackButton />}
-      center={<TodayKeyword title="피드 테스트" dateString="2025.08.06" />}
+      center={<TodayKeyword title={title || "피드"} dateString={dateString} />}
       right={<MoreButton />}
     />
   );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
center={<TodayKeyword title="피드 테스트" dateString="2025.08.06" />}
export default function FeedHeader({
title,
dateString,
}: {
title?: string
dateString?: string
}) {
return (
<CommonHeader
left={<BackButton />}
center={<TodayKeyword title={title || "피드"} dateString={dateString} />}
right={<MoreButton />}
/>
)
}
🤖 Prompt for AI Agents
In shared/ui/header/variants/FeedHeader.tsx at line 10, the TodayKeyword
component uses hardcoded values "피드 테스트" and "2025.08.06". Replace these static
strings with dynamic data by passing appropriate props or state values to
FeedHeader, then forwarding them to TodayKeyword to make the component
data-driven.

<CommonHeader
left={<BackButton />}
center={<TodayKeyword title="피드 테스트" dateString="2025.08.06" />}
right={<MoreButton />}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

MoreButton에 onPress 핸들러가 누락되었습니다.

MoreButton 컴포넌트는 onPress prop을 필요로 하는데 현재 전달되지 않고 있습니다.

-      right={<MoreButton />}
+      right={<MoreButton onPress={() => {/* TODO: 더보기 기능 구현 */}} />}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
right={<MoreButton />}
right={<MoreButton onPress={() => {/* TODO: 더보기 기능 구현 */}} />}
🤖 Prompt for AI Agents
In shared/ui/header/variants/FeedHeader.tsx at line 11, the MoreButton component
is missing the required onPress handler prop. Add an onPress prop to the
MoreButton component with an appropriate handler function to handle the press
event.

<CommonHeader
left={<BackButton />}
//Todo: 검색 페이지 디자인에 따라 UI 수정 + api 연결
center={<TodayKeyword title="검색 테스트" />}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

하드코딩된 테스트 데이터를 개선해주세요.

"검색 테스트"가 하드코딩되어 있습니다. props를 통해 동적으로 전달받거나 적절한 기본값을 사용하는 것이 좋겠습니다.

-export default function SearchHeader() {
+export default function SearchHeader({ title }: { title?: string }) {
   return (
     <CommonHeader
       left={<BackButton />}
       //Todo: 검색 페이지 디자인에 따라 UI 수정 + api 연결
-      center={<TodayKeyword title="검색 테스트" />}
+      center={<TodayKeyword title={title || "검색"} />}
       right={<SearchButton />}
     />
   );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
center={<TodayKeyword title="검색 테스트" />}
export default function SearchHeader({ title }: { title?: string }) {
return (
<CommonHeader
left={<BackButton />}
//Todo: 검색 페이지 디자인에 따라 UI 수정 + api 연결
center={<TodayKeyword title={title || "검색"} />}
right={<SearchButton />}
/>
);
}
🤖 Prompt for AI Agents
In shared/ui/header/variants/SearchHeader.tsx at line 11, the string "검색 테스트" is
hardcoded as a title prop for TodayKeyword. Modify the component to accept this
title as a prop so it can be passed dynamically, and provide a sensible default
value if no prop is given to avoid hardcoding.

left={<BackButton />}
//Todo: 검색 페이지 디자인에 따라 UI 수정 + api 연결
center={<TodayKeyword title="검색 테스트" />}
right={<SearchButton />}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

SearchButton에 onPress 핸들러가 누락되었습니다.

SearchButton 컴포넌트는 onPress prop을 필요로 합니다.

-      right={<SearchButton />}
+      right={<SearchButton onPress={() => {/* TODO: 검색 기능 구현 */}} />}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
right={<SearchButton />}
right={<SearchButton onPress={() => { /* TODO: 검색 기능 구현 */ }} />}
🤖 Prompt for AI Agents
In shared/ui/header/variants/SearchHeader.tsx at line 12, the SearchButton
component is missing the required onPress handler prop. Add an onPress prop to
the SearchButton component, passing a function that handles the press event
appropriately.

return (
<CommonHeader
left={<BackButton />}
center={<TodayKeyword title="고양이" dateString="2025.08.06" />}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

하드코딩된 값들을 동적으로 변경해야 합니다.

TodayKeyword의 title="고양이"와 dateString="2025.08.06"이 하드코딩되어 있습니다. 이는 테스트 값으로 보이며, 실제 업로드 컨텍스트나 현재 날짜를 기반으로 동적으로 설정되어야 합니다.

다음과 같이 수정을 고려해보세요:

-export default function UploadHeader() {
+interface UploadHeaderProps {
+  title: string;
+  dateString?: string;
+}
+
+export default function UploadHeader({ title, dateString }: UploadHeaderProps) {
   return (
     <CommonHeader
       left={<BackButton />}
-      center={<TodayKeyword title="고양이" dateString="2025.08.06" />}
+      center={<TodayKeyword title={title} dateString={dateString} />}
     />
   );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
center={<TodayKeyword title="고양이" dateString="2025.08.06" />}
interface UploadHeaderProps {
title: string;
dateString?: string;
}
export default function UploadHeader({ title, dateString }: UploadHeaderProps) {
return (
<CommonHeader
left={<BackButton />}
center={<TodayKeyword title={title} dateString={dateString} />}
/>
);
}
🤖 Prompt for AI Agents
In shared/ui/header/variants/UploadHeader.tsx at line 9, the TodayKeyword
component uses hardcoded values for title and dateString. Replace these static
values with dynamic props or state values that reflect the actual upload context
or current date. For example, pass the title and dateString as props to
UploadHeader or compute the current date string dynamically to ensure the
component displays relevant and up-to-date information.

@thswogh thswogh merged commit c20e120 into main Aug 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant