Conversation
# Conflicts: # package-lock.json
# Conflicts: # package-lock.json # src/data/ui/bottomSheet.tsx
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
SebellKo
approved these changes
Aug 3, 2025
| const [isOpenGuideSheet, setIsOpenGuideSheet] = useState(false); | ||
|
|
||
| const { mutate: handleAcquireFrog } = useMutation({ | ||
| mutationFn: (key: string) => getFirstFrog(key, session?.user.id), |
Contributor
There was a problem hiding this comment.
mutationFn에 get으로 시작하는 함수명은 조금 헷갈릴수도 있겠다 생각됨니다
| setIsAcquired(true); | ||
| setOwnedFrog(key); | ||
| }, | ||
| }); |
Contributor
There was a problem hiding this comment.
이 mutation은 왜 별도 훅으로 분리 안하셨어요 ? 상태 관리를 컴포넌트 내부에서 하는게 덜 복잡해서 ?
Contributor
Author
There was a problem hiding this comment.
- 우선 로직이 길지 않습니다.
- 총 3단계로 이어지는 흐름이 있는 컴포넌트라서 로직을 분리하기보단 한눈에 보는 것이 직관적이라고 생각했습니다.
- mutation을 꼭 별도로 분리해야하는 이유가 없다고 생각합니다.
| type='button' | ||
| onClick={() => handleClick('yes')} | ||
| className={`${buttonStyle} ${watch('recommend') === 'yes' || typeof window === 'undefined' ? selected : ''}`} | ||
| > |
Contributor
There was a problem hiding this comment.
왜 얘만 갑자기 typeof window ?
서버 렌더링이에요 ?
Contributor
Author
There was a problem hiding this comment.
클라이언트 컴포넌트라고 해도 next.js의 모든 컴포넌트들은 기본적으로 서버에서 초기 렌더가 일어나는 걸로 알고 있어요. 이게 hydration mismatch 같은 에러가 발생하는 이유기도 하고요. 위 조건은 ssr 환경에서 초기 렌더될 때 초기값을 설정하는 용입니다~
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
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.
📍 작업 내용
유저가 프롤로그에 처음 가입하여 책을 쌓아가는 초반 플로우를 개선했습니다.
기존의 경우 책을 2권 쌓은 경우 새로운 캐릭터가 지급되고, 새로운 우물을 생성하도록 유도합니다.
개선된 버전에서는 책을 1권 쌓은 경우 기본 캐릭터 중 하나의 캐릭터를 자율 선택으로 지급하고, 2권 쌓은 경우 기본 캐릭터를 모두 지급합니다.
📍 구현 결과 (선택)
📍 기타 사항