-
Notifications
You must be signed in to change notification settings - Fork 0
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
MARA-9 소셜로그인 기능 구현 #15
Conversation
Network Error
Network Error
|
||
const redirectToLogin: () => Promise<void> = async () => { | ||
if (!token) { | ||
alert('로그인이 필요합니다.'); |
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.
나중에 시스템 alert는 제거 해야될것 같습니당
src/api/login/getToken.ts
Outdated
localStorage.setItem('token', response.data.accessToken); | ||
}) | ||
.catch((error) => { | ||
console.error(error); |
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.
[IMO]
query쓸거라 요기서 예외처리를 하기보다 query쪽에서 예외관리하는 것 어떨까요..!
지원되는 api들도 있고 Suspense 적용에도 이점이 있을 것같읍니당 🥰
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.
그리고 예외들은 로그 대신 토스트 나와도 좋을거 같읍니다아 디자이너랑 말씀해보시죠 이건
src/hooks/queries/useBaseQuery.ts
Outdated
}; | ||
|
||
export const useBaseQuery = <T>(queryKey: any, url: string) => { | ||
return useQuery({ |
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.
query
에서 onSuccess
나 onError
로 지원되는 api가 있지 않나용..!
</Layout> | ||
</ThemeProvider> | ||
</RecoilRoot> | ||
<QueryClientProvider client={queryClient}> |
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.
Suspense
써보는거 어떨까요 query 쓴김에 요고 서스펜스 있는 거로 알고있읍니다.
추가되면 더해서 에러바운더리나 fetching 시 사용될 스피너 or 스켈레톤 이라도 받는대로 추가되어야 될 것 같습니다..!
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.
로그인 복잡했을 텐데 고생많으셨습니다~👏
추가로 에러바운더리 빠른 이슈업 부탁드립니다🛠 |
프로젝트 구조 통일로 일단 다른 수정 이전으로 머지하고 추후에 티켓 받아서 진행하겠습니다🥺🥺
|
요구사항
이슈번호: Mara-9
작업내용
테스트 결과 또는 방법