Skip to content
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

Closed
wants to merge 22 commits into from
Closed

MARA-9 소셜로그인 기능 구현 #15

wants to merge 22 commits into from

Conversation

a-honey
Copy link
Member

@a-honey a-honey commented Feb 6, 2024

요구사항

이슈번호: Mara-9

작업내용

  • 로그인 페이지 마크업
  • 받아온 카카오 token api 요청 후 localStorage 'token' 저장 로직만 추가(api/getToken)
  • 재료 데이터 GET API 확인용 로직만 추가(src/hooks/queries/fridge, pages/fridge)
  • ExclamationAlertSpan 아톰 분리
  • 워크플로우 환경변수 Action Secrets으로 생성 추가

테스트 결과 또는 방법

image

@a-honey a-honey self-assigned this Feb 6, 2024
@a-honey a-honey added the enhancement New feature or request label Feb 6, 2024

const redirectToLogin: () => Promise<void> = async () => {
if (!token) {
alert('로그인이 필요합니다.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 시스템 alert는 제거 해야될것 같습니당

localStorage.setItem('token', response.data.accessToken);
})
.catch((error) => {
console.error(error);
Copy link
Member

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 적용에도 이점이 있을 것같읍니당 🥰

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그리고 예외들은 로그 대신 토스트 나와도 좋을거 같읍니다아 디자이너랑 말씀해보시죠 이건

};

export const useBaseQuery = <T>(queryKey: any, url: string) => {
return useQuery({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query에서 onSuccessonError로 지원되는 api가 있지 않나용..!

</Layout>
</ThemeProvider>
</RecoilRoot>
<QueryClientProvider client={queryClient}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspense 써보는거 어떨까요 query 쓴김에 요고 서스펜스 있는 거로 알고있읍니다.
추가되면 더해서 에러바운더리나 fetching 시 사용될 스피너 or 스켈레톤 이라도 받는대로 추가되어야 될 것 같습니다..!

Copy link
Member

@choipureum choipureum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로그인 복잡했을 텐데 고생많으셨습니다~👏

@choipureum
Copy link
Member

choipureum commented Feb 8, 2024

추가로 에러바운더리 빠른 이슈업 부탁드립니다🛠

@a-honey
Copy link
Member Author

a-honey commented Feb 10, 2024

프로젝트 구조 통일로 일단 다른 수정 이전으로 머지하고 추후에 티켓 받아서 진행하겠습니다🥺🥺

  • withLogin.tsx alert 제거
  • 로그인 api queries 관리
  • Suspense, fallback, 에러 바운더리 추가

@a-honey a-honey closed this Feb 10, 2024
@a-honey a-honey deleted the MARA-9 branch February 13, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants