Skip to content

fix : 난이도 카테고리 변경 시 페이지 초기화#142

Merged
leetaewon123 merged 1 commit intodevfrom
fix/problems
Oct 19, 2025
Merged

fix : 난이도 카테고리 변경 시 페이지 초기화#142
leetaewon123 merged 1 commit intodevfrom
fix/problems

Conversation

@leetaewon123
Copy link
Copy Markdown
Collaborator

@leetaewon123 leetaewon123 commented Oct 19, 2025

🔎 작업 사항

-난이도 카테고리 변경 시 페이지 초기화

➕ 관련 이슈

Summary by CodeRabbit

버그 수정

  • 필터 변경 시 페이지 번호 자동 초기화: 카테고리 또는 난이도 필터를 변경할 때 자동으로 첫 번째 페이지로 돌아갑니다. 필터 변경 후 올바른 검색 결과를 확인할 수 있도록 개선했습니다.

@leetaewon123 leetaewon123 merged commit 082713b into dev Oct 19, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

필터 변경(categoryCode 또는 difficulty)이 발생할 때 currentPage를 0으로 리셋하는 useEffect 훅이 추가되었습니다. 이는 필터 변경 시 페이지네이션 제어 흐름을 개선하며, 다른 기능적 변경은 없습니다.

Changes

Cohort / File(s) 변경 요약
페이지네이션 필터 리셋
src/app/(auth)/(navigationsBarLayout)/problems/page.tsx
useEffect를 React import에 추가하고, categoryCode 또는 difficulty 의존성 변경 시 currentPage를 0으로 리셋하는 새로운 effect 구현

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

fix

Poem

🐰 필터가 바뀌면, 첫 페이지로 돌아가
페이지네이션 춤을 추며,
사용자의 혼란을 말끔히 치워,
작지만 매끄러운 변화가 흐르네! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/problems

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5160a0 and ceb691f.

📒 Files selected for processing (1)
  • src/app/(auth)/(navigationsBarLayout)/problems/page.tsx (2 hunks)

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.

@coderabbitai coderabbitai Bot added the fix label Oct 19, 2025
@grimza99 grimza99 deleted the fix/problems branch January 16, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant