Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
개요join-complete-page 컴포넌트에서 useAuthStore의 boardShare 데이터를 추가로 활용하여 보드 인증 흐름을 개선했습니다. boardId 누락 시 인증을 재실행하고 결과에 따라 /board 또는 /join/nickname으로 조건부 네비게이션하도록 수정하였습니다. 변경사항
예상 코드 리뷰 소요시간🎯 2 (Simple) | ⏱️ ~10 minutes 관련 가능성 있는 PR
제안 라벨
제안 검토자
축하 시
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)src/pages/joinPage/pages/join-complete-page.tsx (1)
🔇 Additional comments (2)
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. Comment |
|
✨ Storybook: 🔗 https://690458540424857aa71aec97-tckcpbtqpw.chromatic.com/ |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/joinPage/pages/join-complete-page.tsx (1)
18-37: 에러 처리가 누락되었습니다.
checkAuth호출에 대한 에러 처리가 없습니다. 인증 재시도가 실패하거나 예상치 못한 오류가 발생할 경우 사용자에게 피드백이 제공되지 않습니다.🔎 에러 처리 추가 제안
if (!boardShare?.boardId) { // 보드 정보가 없으면 인증을 다시 시도 void checkAuth({ force: true }).then((data) => { if (data?.boardId) { navigate("/board"); } else { navigate("/join/nickname"); } - }); + }).catch((error) => { + console.error("인증 재시도 실패:", error); + navigate("/join/nickname"); + }); return; }로딩 상태 추가를 권장합니다.
인증 재시도 중에 사용자에게 로딩 상태를 표시하여 UX를 개선하고 중복 클릭을 방지할 수 있습니다.
🔎 로딩 상태 추가 제안
+import { useEffect, useState } from "react"; export default function JoinCompletePage() { const navigate = useNavigate(); const { isLoggedIn, checkAuth, hasFetchedAuth, boardShare } = useAuthStore(); + const [isNavigating, setIsNavigating] = useState(false); // ... useEffect code ... const handleToBoard = () => { if (!isLoggedIn) { navigate("/"); return; } + if (isNavigating) { + return; + } + if (!boardShare?.boardId) { // 보드 정보가 없으면 인증을 다시 시도 + setIsNavigating(true); void checkAuth({ force: true }).then((data) => { if (data?.boardId) { navigate("/board"); } else { navigate("/join/nickname"); } }).catch((error) => { console.error("인증 재시도 실패:", error); navigate("/join/nickname"); + }).finally(() => { + setIsNavigating(false); }); return; } navigate("/board"); }; return ( <PageLayout // ... bottomContent={ - <NavigationButton className="w-full" active={true} onClick={handleToBoard}> + <NavigationButton className="w-full" active={true} onClick={handleToBoard} disabled={isNavigating}> 다음으로 </NavigationButton> } >
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/joinPage/pages/join-complete-page.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/joinPage/pages/join-complete-page.tsx (1)
src/stores/useAuthStore.ts (1)
useAuthStore(20-75)
🔇 Additional comments (2)
src/pages/joinPage/pages/join-complete-page.tsx (2)
10-10: LGTM!
boardShare를 store에서 가져오는 로직이 올바르게 추가되었습니다.
51-51: LGTM!
NavigationButton에active={true}prop을 추가하여 버튼의 활성 상태를 명확하게 표현했습니다.
Summary
해당 PR에 대한 작업 내용을 요약하여 작성해주세요.
Tasks
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.