Skip to content

fix: 온보딩 월간 캘린더 진입 날짜 수정#427

Merged
bongtta merged 2 commits into
developfrom
fix/#426/entry-date
May 13, 2026
Merged

fix: 온보딩 월간 캘린더 진입 날짜 수정#427
bongtta merged 2 commits into
developfrom
fix/#426/entry-date

Conversation

@bongtta

@bongtta bongtta commented May 13, 2026

Copy link
Copy Markdown
Contributor

#️⃣ Related Issue

Closes #426

☀️ New-insight

💎 PR Point

온보딩 날짜 선택 단계에서 여전히 진입일 기준 이틀 후 날짜가 디폴트 값으로 설정되어 있어 수정했습니다.
더이상 사용되지 않는 파일 제거했습니다.

📸 Screenshot

Summary by CodeRabbit

릴리스 노트

  • 리팩토링
    • 홈 캘린더 탭 컴포넌트를 제거하여 코드베이스를 정리했습니다.
    • 날짜 선택 컴포넌트의 초기화 로직을 간소화하여 코드 효율성을 개선했습니다.

@bongtta bongtta self-assigned this May 13, 2026
@bongtta bongtta requested a review from heesunee as a code owner May 13, 2026 09:21
@bongtta bongtta linked an issue May 13, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

개요

홈 화면의 HomeCalendarTap 컴포넌트가 완전히 제거되었으며, 온보딩의 date-select.tsx에서 날짜 초기화 로직을 getInitialSelectedDate 유틸 함수에서 로컬 entryDate 변수 기반으로 변경하여 캘린더 진입 날짜를 현재 날짜로 통일했습니다.

변경 사항

HomeCalendarTap 컴포넌트 제거

레이어 / 파일(s) 요약
컴포넌트 제거
src/pages/home/components/home-calendar-tap.tsx
상태 관리 로직(selectedDate, baseWeekDate), WeekCalendar 렌더링, onChange 핸들러 및 기본 내보내기를 포함한 전체 컴포넌트가 제거되었습니다.

온보딩 날짜 선택 초기화 로직 개선

레이어 / 파일(s) 요약
날짜 초기화 통일
src/pages/onboarding/components/date-select.tsx
getInitialSelectedDate 임포트 제거하고 단일 entryDate 변수(new Date())를 도입하여 selectedDatecurrentMonth를 일관되게 초기화하고, MonthCalendar에도 동일한 entryDate를 전달하도록 수정했습니다.

예상 코드 리뷰 난이도

🎯 2 (간단함) | ⏱️ ~10분

관련 PR

  • MATEBALL/MATEBALL-CLIENT#333: date-select.tsx 수정으로 게임 목록 미리 가져오기 및 바텀 시트 열기 제어와 관련된 동일 파일 변경.
  • MATEBALL/MATEBALL-CLIENT#152: 동일 파일의 캘린더 상태(selectedDate/currentMonth) 및 MonthCalendar 날짜 전달 방식 변경으로 월/날짜 선택 동작 영향.

제안 리뷰어

  • heesunee
  • Dubabbi
  • yeeeww

🐰 축하 시

🌙 낡은 달력은 물러나고,
✨ 깔끔한 날짜 흐름이 펼쳐지네요!
📅 온보딩의 오늘이 오늘답게,
한 줄로 정렬된 코드의 우아함이라오~🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive HomeCalendarTap 컴포넌트 제거는 더 이상 사용되지 않는 파일 정리로 PR 설명과 일치하지만, 주요 기능 변경과의 관계 확인 필요합니다. HomeCalendarTap 제거가 date-select.tsx 변경과의 관계와 이전 코드에서의 의존성을 문서화하여 명확히 하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 온보딩 월간 캘린더의 진입 날짜를 수정하는 것으로, 변경사항의 핵심을 명확하게 반영합니다.
Linked Issues check ✅ Passed date-select.tsx에서 entryDate를 현재 날짜(new Date())로 초기화하도록 변경하여 #426의 요구사항을 충족합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#426/entry-date

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

MATEBALL-STORYBOOK
⚾ Storybook 배포가 완료되었습니다!

@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.

🧹 Nitpick comments (1)
src/pages/onboarding/components/date-select.tsx (1)

27-29: ⚡ Quick win

entryDate를 컴포넌트 본문에서 렌더마다 재생성하지 말고 마운트 시에만 고정하세요.

React 공식 문서에 따르면 함수형 컴포넌트 본문의 모든 코드는 매 렌더링마다 실행됩니다. 현재 const entryDate = new Date();는 매 렌더링마다 새로운 Date 객체를 생성하므로, MonthCalendarentryDate prop이 초기 진입 시점과 달라질 수 있습니다. 진입 당일을 기준으로 유지하려면 마운트 시에 한 번만 고정해야 합니다.

수정 예시
-import { useState } from 'react';
+import { useRef, useState } from 'react';

-  const entryDate = new Date();
+  const entryDateRef = useRef(new Date());
+  const entryDate = entryDateRef.current;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/onboarding/components/date-select.tsx` around lines 27 - 29,
entryDate is being recreated on every render; fix by creating a stable initial
date during mount (e.g., useMemo/useRef/useState initializer) and use that
single value for selectedDate, currentMonth and MonthCalendar's entryDate prop
so the "entry day" stays constant across renders; update references to the new
stable identifier (entryDate or initialEntryDate) in the useState initializers
for selectedDate and currentMonth and in the MonthCalendar prop.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/pages/onboarding/components/date-select.tsx`:
- Around line 27-29: entryDate is being recreated on every render; fix by
creating a stable initial date during mount (e.g., useMemo/useRef/useState
initializer) and use that single value for selectedDate, currentMonth and
MonthCalendar's entryDate prop so the "entry day" stays constant across renders;
update references to the new stable identifier (entryDate or initialEntryDate)
in the useState initializers for selectedDate and currentMonth and in the
MonthCalendar prop.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2ef3dbc8-0d53-45c9-96c4-acdfa3bf724f

📥 Commits

Reviewing files that changed from the base of the PR and between ccca857 and 25887ff.

📒 Files selected for processing (2)
  • src/pages/home/components/home-calendar-tap.tsx
  • src/pages/onboarding/components/date-select.tsx
💤 Files with no reviewable changes (1)
  • src/pages/home/components/home-calendar-tap.tsx

@bongtta bongtta merged commit 9c3760d into develop May 13, 2026
5 checks passed
@bongtta bongtta deleted the fix/#426/entry-date branch May 13, 2026 09:24
bongtta added a commit that referenced this pull request May 18, 2026
* fix: 진입 날짜 수정 (#426)

* chore: 파일 삭제 (#426)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 온보딩 월간 캘린더 진입 날짜를 수정합니다

1 participant