-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 로그인 기능 구현 #165
feat: 로그인 기능 구현 #165
Conversation
✅ Deploy Preview for moabam-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
useEffect(() => { | ||
mutate( | ||
{ code: code ?? '' }, | ||
{ | ||
onSuccess: ({ signUp }) => { | ||
moveTo(signUp ? 'guide' : 'start'); | ||
} | ||
} | ||
); | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요 부분이 조금 마음에 걸리는데요!
이 페이지가 렌더링되면 자동으로 로그인 검증 요청 API를 쏴야하는데
로그인 검증 요청 API의 HTTP 메소드가 POST
이다보니 useQuery
를 사용하는건 적절하지 않다고 판단해서 useEffect
에서 호출했는데 어떻게 생각하시나요!? 혹은 더 좋은 방법이 있을까요?
(개발 모드에서는 두 번 호출되기 때문에 API 호출도 두 번 발생하긴 합니다..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 같은 생각입니당 POST요청이기에 mutate가 맞다고 생각돼요! 도움을 드리고 싶지만 저도 useEffect
방법밖에 생각이 나지않네요 ㅠㅠ
useEffect(() => { | ||
mutate( | ||
{ code: code ?? '' }, | ||
{ | ||
onSuccess: ({ signUp }) => { | ||
moveTo(signUp ? 'guide' : 'start'); | ||
} | ||
} | ||
); | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 같은 생각입니당 POST요청이기에 mutate가 맞다고 생각돼요! 도움을 드리고 싶지만 저도 useEffect
방법밖에 생각이 나지않네요 ㅠㅠ
저희도 BE에서 사용하신 방법을 비슷하게 써보면 좋을 것 같아용! |
🧩 이슈 번호
✅ 작업 사항
/
로 이동. 회원가입이면/guide
로 이동.👩💻 공유 포인트 및 논의 사항
GOMCAM.20231117_2302460131.mp4
.env
파일에 들어가야 할 내용이 몇 가지 추가되었는데, 이걸 어떻게 공유할까요?BE 팀에서는 서브 모듈을 사용하시는 것 같던데, 비슷하게 구성해볼까요?