Skip to content

[fix] 관리자 탭 클릭 시 데이터 리패칭#1096

Merged
lepitaaar merged 1 commit intodevelop-fefrom
fix/#1095-admin-tab-data-refresh-MOA-558
Jan 25, 2026
Merged

[fix] 관리자 탭 클릭 시 데이터 리패칭#1096
lepitaaar merged 1 commit intodevelop-fefrom
fix/#1095-admin-tab-data-refresh-MOA-558

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Jan 24, 2026

#️⃣연관된 이슈

ex) #1095

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지/동영상 첨부 가능)

브라우저 캐시에 서버 상태가 저장되고 있어 (혹시나 그럴일은 없겠지만) 중요한 정보들이 캐시될 위험을 방지하기 위해

관리자탭 클릭마다 데이터를 새로 가져오도록 변경했습니다.

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • Chores
    • 관리자 페이지 탭 전환 시 데이터 갱신 메커니즘 최적화

✏️ Tip: You can customize this high-level summary in your review settings.

@seongwon030 seongwon030 self-assigned this Jan 24, 2026
@seongwon030 seongwon030 added 💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels Jan 24, 2026
@vercel
Copy link

vercel bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 24, 2026 5:57pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

Walkthrough

SideBar 컴포넌트에 React Query의 useQueryClient 훅을 추가하여 탭 클릭 시 캐시를 무효화하는 기능을 구현했습니다. 네비게이션 로직이나 탭 데이터 구조는 변경되지 않았으며, 탭 상호작용 시 캐시 갱신 사이드 이펙트만 추가되었습니다.

Changes

코호트 / 파일 변경 요약
React Query 캐시 무효화
frontend/src/pages/AdminPage/components/SideBar/SideBar.tsx
useQueryClient 훅 추가 및 탭 클릭 시 queryClient.invalidateQueries() 호출 구현으로 탭 전환 시 최신 데이터 로드 보장

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related issues

  • MOA-558: 관리자가 탭 간 이동 시 항상 최신 데이터를 확인할 수 있도록 캐시 무효화 메커니즘을 구현하는 이 PR의 직접적인 해결책입니다.

Possibly related PRs

Suggested reviewers

  • oesnuj
  • suhyun113
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 '관리자 탭 클릭 시 데이터 리패칭'으로 변경사항의 핵심을 명확하게 설명하고 있으며, 코드 요약과 일치합니다.
Linked Issues check ✅ Passed MOA-558 요구사항(탭 간 이동 시 최신 데이터 표시)을 SideBar 컴포넌트에 queryClient.invalidateQueries() 추가로 충족하고 있습니다.
Out of Scope Changes check ✅ Passed SideBar.tsx의 모든 변경사항은 탭 클릭 시 캐시 무효화라는 명확한 목표에 부합하며, 범위를 벗어난 변경사항이 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Contributor

@lepitaaar lepitaaar left a comment

Choose a reason for hiding this comment

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

리페치 작업 수고하셨습니다. 항상 최신상태를 보장할 수 있겠네요 👍👍👍

trackEvent(ADMIN_EVENT.TAB_CLICKED, {
tabName: item.label,
});
queryClient.invalidateQueries();
Copy link
Contributor

Choose a reason for hiding this comment

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

모든키 무효화가 괜찮을지 모르겠네요 ㅋㅋㅋ.. 생각해봐도 큰문젠없을꺼 같은데 괜히 찜찜한느낌

@lepitaaar lepitaaar merged commit a4a1d60 into develop-fe Jan 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] MOA-558 관리자는 탭 간 이동 시 항상 최신 데이터를 확인한다

2 participants

Comments