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

Feature/fe-059 로그인 여부에 따른 기능제한 추가 #82

Merged
merged 9 commits into from
Jul 7, 2023

Conversation

sxungchxn
Copy link
Member

@sxungchxn sxungchxn commented Jul 4, 2023

비로그인 상태에서 먹팟 참여 버튼시 로그인 페이지로 이동

비로그인 상태에서 먹팟 만들기 클릭하면 로그인 페이지로 이동

체크 리스트

  • 적절한 제목으로 수정했나요?
  • 관련된 이슈와 연결 시켰나요?
  • Target Branch를 올바르게 설정했나요?
  • Label을 알맞게 설정했나요?

작업 내역

  • Profile 쿼리를 미리 받아오는 로직이 많이 쓰여서 Provider 로 구성
  • 비로그인 상태에서 참여하기 버튼 클릭시 로그인 페이지로 이동
  • 비로그인 상태에서 먹팟 만들기 버튼 클릭시 로그인 페이지로 이동
  • 로그인 성공시 뒤로 가기로 이동하기하는 방식으로 개편
  • 로그아웃 기능 추가

문제 상황과 해결

  • 기존에는 로그인 성공 시 홈으로 이동하기로 구성되어있었으나 사용자 흐름상 더 자연스럽게 구성하기 위해 뒤로가기로 바꾸었습니다.

    • 기존방식(무조건 홈으로 이동)

      로그인_홈으로이동

    • 새로운 방식(뒤로 이동)

      로그인_뒤로가기

비고

  • 참고했던 링크 등 참고 사항을 적어주세요. 코드 리뷰하는 사람이 참고해야 하는 내용을 자유로운 형식으로 적을 수 있습니다.

@sxungchxn sxungchxn added the ✨ feature new feature label Jul 4, 2023
@sxungchxn sxungchxn self-assigned this Jul 4, 2023
@sxungchxn sxungchxn linked an issue Jul 4, 2023 that may be closed by this pull request
2 tasks
@@ -22,7 +22,7 @@ const LoginForm = () => {
{ email, password, keep },
{
onSuccess: () => {
router.replace('/');
router.back();
Copy link
Contributor

Choose a reason for hiding this comment

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

router.back()을 사용하는 경우에 로그인 페이지로 바로 진입시 먹팟을 벗어나는 이슈가 존재할 것 같아요!
보통 return url을 query param에 인코딩해서 넣고 replace 시켜주는 방법을 사용하는데, back으로 추가한 이유가 있을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

그런 부작용이 있겠네요! 저는 기존 방식에서는 상세페이지에서 로그인 페이지로 갔을때 무조건 홈으로 가게되는 문제가 있어서 back 하는 방식을 적용해봤던거였는데 알려주신 방법을 적용하면 확실히 이탈을 막을수 있을 것 같네요 한번 적용해보도록 하겠습니다!

@sonarcloud
Copy link

sonarcloud bot commented Jul 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@jieunpark247 jieunpark247 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~ 👍🏼

@sxungchxn sxungchxn merged commit 29c3314 into dev Jul 7, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 로그인에 여부에 따른 제한 처리 적용
2 participants