fix: 랜딩페이지 cta 분기, 사이드바 반응형 충돌, 로고 경로, 캐시 통일#88
Conversation
Summary of ChangesHello @yooolleee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 경험을 개선하고 여러 UI/UX 문제를 해결하는 데 중점을 둡니다. 랜딩 페이지의 '지금 시작하기' 버튼이 사용자의 로그인 상태에 따라 적절한 페이지로 안내하도록 로직을 강화했으며, 로그인 및 회원가입 플로우를 개선했습니다. 또한, 사이드바와 모바일 헤더 간의 반응형 레이아웃 충돌을 해결하여 다양한 화면 크기에서 일관된 UI를 제공합니다. 마지막으로, 사용자 데이터 조회 훅의 유연성을 높이고 로그아웃 시 오류 처리를 개선했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| } else { | ||
| router.push('/addteam'); | ||
| } |
There was a problem hiding this comment.
로그인 후 사용자 정보를 가져오는 데 실패했을 때, 에러를 던져서 catch 블록에서 처리하도록 하는 것이 더 안전해 보입니다. 현재 코드는 사용자 정보 조회에 실패하면 무조건 팀 추가 페이지로 보내는데, 이는 일시적인 네트워크 오류인 경우 사용자에게 혼란을 줄 수 있습니다. 에러를 발생시켜 catch 블록에서 '네트워크 오류' 메시지를 보여주는 것이 더 나은 사용자 경험을 제공할 것입니다.
| } else { | |
| router.push('/addteam'); | |
| } | |
| } else { | |
| throw new Error('Failed to fetch user data after login.'); | |
| } |
There was a problem hiding this comment.
이 코드리뷰는 고치지 않아도 됩니다. /addteam으로 보내는 이유는 로그인 성공 상태에서 토큰도 쿠키에 저장된 상태에서 유저 정보 조회가 일시적으로 실패한 경우 /addteam으로 보내면 거기서 다시 유저 정보를 받아오고, 팀이 있으면 자동으로 팀 페이지로 이동하도록 설계됐습니다. 즉 최악의 경우에도 로그인 상태는 유지되고 정상 경로로 복구됩니다.
AI 제안처럼 에러를 던지면:
로그인 성공 → 유저 정보 조회 실패 → 에러 → catch 블록 → setError('email', ...) → 사용자는 로그인 실패로 인식
이건 실제로 로그인은 됐는데 사용자한테 실패처럼 보여주는 거라 더 혼란스러울 수 있습니다.
| export function useCurrentUserQuery(options?: { retry?: boolean | number }) { | ||
| return useQuery({ ...currentUserQueryOptions(), ...options }); | ||
| } |
There was a problem hiding this comment.
현재 options 타입이 { retry?: boolean | number }로 매우 제한적입니다. PR 설명에 'retry 등'이라고 언급된 것을 보면 앞으로 다른 옵션도 사용될 가능성이 있어 보입니다. currentUserQueryOptions의 반환 타입을 활용하여 타입을 더 유연하게 만들면 재사용성과 확장성이 향상될 것입니다. 이렇게 하면 retry 외에 staleTime, enabled 등 react-query가 제공하는 모든 옵션을 타입 안전하게 사용할 수 있습니다.
| export function useCurrentUserQuery(options?: { retry?: boolean | number }) { | |
| return useQuery({ ...currentUserQueryOptions(), ...options }); | |
| } | |
| export function useCurrentUserQuery(options?: Partial<ReturnType<typeof currentUserQueryOptions>>) { | |
| return useQuery({ ...currentUserQueryOptions(), ...options }); | |
| } |
Summary
Sidebar.tsx, MobileHeader.tsx 로고 기본 경로 /addteam → / 변경 (공통 컴포넌트라 각 페이지 확인 필요)
Sidebar.module.css / MobileHeader.module.css 에서 반응형 상태에서 정확히 1199px 폭에서 두 컴포넌트가 동시에 렌더되는 구간이 존재
/* 변경 전 */
@media (max-width: 1199px) { ... }
/* 변경 후 */
@media (max-width: 1200px) { ... }
useCurrentUserQuery.ts
(root)/layout.tsx에서 옵션을 전달할 수 없었음
무엇: options 파라미터 추가 (retry 등 오버라이드 가능하도록)
// 변경 전
export function useCurrentUserQuery() {
return useQuery(currentUserQueryOptions());
}
// 변경 후
export function useCurrentUserQuery(options?: { retry?: boolean | number }) {
return useQuery({ ...currentUserQueryOptions(), ...options });
}
Issue
Scope
포함
특이사항