feat(repo): GitHub 레포지토리 후보 조회 및 등록 기능 실제 API 연동#25
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| @@ -0,0 +1,46 @@ | |||
| //중복되는 타입일 수 있으나 정의하는 상태가 달라서 일단 분리 X | |||
| }) { | ||
| const register = useRegisterRepoMutation() | ||
| const disabled = | ||
| candidate.alreadyRegistered || candidate.private || register.isPending |
There was a problem hiding this comment.
[질문] private 리포는 disable 처리되나요? 혹시 왜 그런지 여쭤봐도 될까요?
There was a problem hiding this comment.
docs보니 private도 분석 대상이라고 되어있네여. 비활성화는 오류인것 같아 수정했습니다.
|
|
||
| export function RepositoryPanel() { | ||
| const [tab, setTab] = useState<Tab>('registered') | ||
| const { data } = useRegisteredReposQuery() |
|
|
||
| {tab === 'registered' ? ( | ||
| <div id="repo-panel-registered" role="tabpanel"> | ||
| <RegisteredRepositoryList |
There was a problem hiding this comment.
- 여기에 RegisteredRepositoryList 가 있습니다.
There was a problem hiding this comment.
데이터 흐름까지 ㄷㄷ 리뷰할 줄 아시는분
| } | ||
|
|
||
| export function RegisteredRepositoryList({ onBrowseCandidates }: Props) { | ||
| const { data, isLoading, isError, error, refetch } = useRegisteredReposQuery() |
There was a problem hiding this comment.
- 여기서도 useRegisteredReposQuery 를 호출하네요.
이러면 중복으로 두 번 호출하게 될듯합니다.
불필요한 호출이 발생하겠네요
There was a problem hiding this comment.
TanStack Query가 동일한 queryKey에 대해 자동으로 처리해주기때문에 네트워크 요청은 1화만 발생합니다.
Prop Drilling 방식은 FSD 아키텍처 관점에서 응집도가 떨어질 것 같아 사용하지 않았습니다.
혹시 제가 잘못 이해하고 있으면 다시 말씀주세요 👍
There was a problem hiding this comment.
네트워크 요청은 한번만 발생하는게 맞습니다. 다만 데이터가 변경될 대 렌더링이 한 번 더 발생할 것 같았습니다.
처음에는 Prop Drilling이 더 좋다고 생각했는데 FSD 응집도를 보면 꼭 그렇지는 않네요.
지금 구조가 더 나아보입니다.
There was a problem hiding this comment.
마감 기한이 빠듯하다 보니 성능 최적화는 기능 구현 완료되고 집중적으로 하게되지 않을까 싶습니다!
| | `auth` | GitHub OAuth, 토큰 관리, 로그아웃, 동의 | US-01, US-02, US-03, US-04 | | ||
| | `resume` | 이력서 업로드, 목록, 삭제 | US-05, US-06 | | ||
| | `repo` (계획) | GitHub 레포 가져오기/등록/삭제 | US-07, US-08 | | ||
| | `repo` | GitHub 레포 가져오기/등록/삭제 | US-07, US-08 | |
|
고생하셨습니다 |
변경 사항
📋 작업 요약
GitHub 레포지토리 도메인(
features/repo) 슬라이스를 구축하고, 연동된 깃헙 후보 목록을 가져와 등록하고 관리하는 전체 플로우를 실제 API와 연동했습니다.✨ 주요 변경 사항
api/repo.ts)GET /api/repositories/github) 및 등록 목록(GET /api/repositories) 통신 로직을 작성했습니다.page/perPage), 등록 목록은 0-based Spring Pageable(page/size) 방식의 컨벤션을 각각 훅에 맞게 적용했습니다.RepositoryPanel탭 컴포넌트CandidateRepositoryList)alreadyRegistered,private플래그를 확인하여 등록 버튼 활성화/비활성화 및 뱃지 상태를 실시간으로 제어합니다.RegisteredRepositoryList)💡 리뷰어 참고 사항
feature/resume-managementPR을 베이스로 확인해 주세요.