Skip to content

fix: formatData 유틸 함수 수정 및 pooling 주기 수정#59

Merged
haeni82 merged 1 commit into
developfrom
feature/policy-api
Mar 19, 2026
Merged

fix: formatData 유틸 함수 수정 및 pooling 주기 수정#59
haeni82 merged 1 commit into
developfrom
feature/policy-api

Conversation

@haeni82
Copy link
Copy Markdown
Contributor

@haeni82 haeni82 commented Mar 19, 2026

이슈

  • closed #이슈번호

✔️ 체크리스트

  • : Merge할 브랜치를 확인해 주세요.

🔍 작업 내용

  • 풀링 주기 수정(백엔드 테스트 후 다시 원래대로 수정해야함)

⚠️ 주의 사항 / 기타

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 동일한 이름을 가진 사용자가 여러 명일 때만 전화번호 접미사가 표시되도록 개선했습니다.
  • 개선사항

    • 데이터 새로고침 빈도를 향상시켜 더 최신 정보를 빠르게 확인할 수 있습니다.
    • 데이터 포맷 표시 방식을 최적화했습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 57f35b18-3170-4bc6-9489-b62dd84ef6d2

📥 Commits

Reviewing files that changed from the base of the PR and between 574910a and a551168.

📒 Files selected for processing (3)
  • src/page/Main/MainPage.tsx
  • src/page/Main/components/SharedPoolUsage.tsx
  • src/utils/dataFormat.ts

📝 Walkthrough

개요

React Query 폴링 빈도를 10,000ms에서 500ms로 단축하고, UsageData 쿼리에 백그라운드 재요청 및 이전 데이터 유지 옵션을 추가했습니다. SharedPoolUsage 컴포넌트의 전화번호 접미사 표시 조건을 개선하고, formatData 유틸리티를 GB 단위로 단순화했습니다.

변경사항

코호트 / 파일 요약
React Query 폴링 설정
src/page/Main/MainPage.tsx
familyMembers, UsageData, sharedPool, blockStatus 쿼리의 refetchInterval을 10000ms에서 500ms로 변경. UsageData 쿼리에 refetchIntervalInBackground: trueplaceholderData: keepPreviousData 옵션 추가.
조건부 렌더링 로직
src/page/Main/components/SharedPoolUsage.tsx
전화번호 접미사 (…last4)를 동일한 이름의 사용자가 2명 이상일 경우에만 표시하도록 변경.
데이터 포맷팅 유틸리티
src/utils/dataFormat.ts
formatData() 함수의 조건부 로직을 제거하여 항상 GB 단위로 변환하도록 단순화.

예상 코드 리뷰 난이도

🎯 2 (단순함) | ⏱️ ~12분

관련 가능성이 있는 PR

  • Feature/policy api #44: src/page/Main/MainPage.tsx의 useQuery 옵션(폴링/플레이스홀더 동작) 및 src/utils/dataFormat.ts을 동일하게 수정하고 있음.
  • fix: 현재 적용중인 정책 GB 변환 통일 #52: formatData의 GB 변환 로직을 수정하며, 동시에 해당 유틸리티를 수동 GB 계산 대체로 활용하고 있음.
  • Feature/main api #41: src/utils/dataFormat.ts 및 MainPage useQuery 관련 코드에서 유사한 데이터 포맷팅/소비 유틸리티를 수정하고 있음.
✨ 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 feature/policy-api
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@haeni82 haeni82 merged commit 90849f1 into develop Mar 19, 2026
1 of 2 checks passed
This was referenced Mar 19, 2026
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