[PR] 과제 업로드 로딩 페이지(UploadLoadingPage) 리펙토링#65
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the UploadLoadingPage by extracting its state management logic into a new custom hook, useUploadLoadingProgress, and its UI into the UploadLoadingSection component. The reviewer provided several constructive suggestions to improve the code quality, including optimizing the progress timer by preventing unnecessary intervals when a projectId is present, replacing various magic numbers with descriptive constants, and moving the reversal of the LOADING_STEPS array outside of the useMemo hook to avoid redundant computations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 요약 (Summary)
업로드 로딩 페이지의 로직과 화면을 분리해서 구조를 정리했습니다.
페이지는 더 단순하게 만들고, 로딩 진행 상태 계산은 hook으로, 화면은 section으로 나눴습니다.
✅ 주요 변경 사항 (Key Changes)
UploadLoadingPage에서 로딩 진행 로직을useUploadLoadingProgress로 분리했습니다.UploadLoadingSection으로 분리했습니다.🛠 상세 구현 내용 (Implementation Details)
1. 로딩 진행 로직 분리
useUploadLoadingProgress로 분리했습니다.projectId가 생기면 업로드 step 페이지로 이동error가 생기면 업로드 페이지로 이동2. 로딩 화면 UI 분리
UploadLoadingSection으로 분리했습니다.progress와currentStepMessage값만 받아서 화면을 그립니다.3. 페이지 역할 단순화
UploadLoadingPage는 직접 로직을 처리하지 않고,useUploadLoadingProgress를 호출하고UploadLoadingSection을 보여주는 역할만 합니다.🚨 트러블 슈팅 (Trouble Shooting)
해당 없음
📎 알려진 이슈 및 참고 사항 (Known Issues & Notes)
useUploadFlowStore의projectId를 기준으로 동작합니다./upload/loading에 직접 들어오면projectId가 없어서, 진행률이 올라가다가 멈춘 상태처럼 보일 수 있습니다.projectId복구 방식을 검토하여 개선하겠습니다.
🖼 스크린샷 (Screenshots)
해당 없음
#️⃣ 관련 이슈 (Related Issues)