-
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
[ Feature/dev 76 ] 로그아웃 API 연동 #136
Conversation
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.
야무지게 핸들러 조합해주셨네여 ㅎㅎㅎ 수고하셨습니다!!
그리고 테스트 에러는 dynamic import 때문에 나타나는건데 차차 해결방법 찾아보겠습니다!
return render( | ||
<QueryClientProvider client={queryClient}> | ||
<LogoutLink title={"로그아웃"} /> | ||
</QueryClientProvider>, |
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.
이거 QueryClientProvider
컴포넌트 쓰면 됩니다!
})), | ||
}; | ||
}); | ||
}); |
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.
vi.mock 으로 next/navigation하는 부분이 꽤있는데 따로 함수로 작성해놓고 사용하는게 좋을까요?
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.
이거 리팩토링으로 반영하면 좋을 듯 합니당!!
await waitFor(() => { | ||
expect(document.cookie).not.toContain("accessToken=accessToken"); | ||
expect(document.cookie).not.toContain("refreshToken=refreshToken"); | ||
expect(mockPush).toHaveBeenCalledWith("/auth"); |
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.
오..근데 로그아웃 하면...auth 페이지로 이동하나요? / 메인이 아니라..?!! (궁금)
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.
앗 메인입니다.. !!
return fewFetch().delete(API_ROUTE.LOGOUT()) | ||
} | ||
|
||
export const logOutOptions = (): UseMutationOptions< |
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.
logOutMutaionOption 이라고 지정하면 더 명확할것같아여!
{title} | ||
</Link> | ||
), | ||
component: ({ title }: { title: string }) => <LogoutLink title={title} />, |
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.
야무지게 바꿔주셨네요..! 감사합니다!
@Happhee |
🔥 Related Issues
https://linear.app/fewletter/issue/DEV-76/%EB%A1%9C%EA%B7%B8%EC%95%84%EC%9B%83-api-%EC%97%B0%EB%8F%99
💜 작업 내용
논의 했을 때 회원 탈퇴랑 로그아웃이랑 똑같이 해서 보낸다고 결론 나서 일단 같은 컴포넌트 끼워놨습니다!