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

[FE] 로그인하지 않은 상태에서 페이지에 접근할 때 처리(#551) #552

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 10, 2024

📓 스토리북 링크

바로가기

📌 관련 이슈

✨ PR 세부 내용

  • private 라우터와 public 라우터를 나누어서 private 일 때는 다른 화면을 보여주게 하였습니다.
    image

  • 로그인 글자 보이게 하였습니다. 문구가 바에 가려지는 게 아쉽다는 피드백이 있었습니다. 이 디자인 어떤가욤??
    image

  • 이전으로 갔을 때 callback 페이지로 넘어가면 로그인을 다시 하게 되어 오류가 생겼었습니다. 아래 코드를 추가하여 브라우저의 history stack에서 현재 페이지를 덮어쓰고, 새로운 페이지로 이동한 후에 뒤로 가기를 눌렀을 때 현재 페이지로 돌아올 수 없도록 하였습니다.

CallbackPage.tsx

const timer = setTimeout(() => {
  navigate("/", { replace: true });
}, 2000);

@github-actions github-actions bot added FE 프론트 개발 관련 작업 기능 기능 구현 작업 labels Oct 10, 2024
@chlwlstlf chlwlstlf self-assigned this Oct 10, 2024
@github-actions github-actions bot requested review from 00kang and pp449 October 10, 2024 16:42
Copy link
Contributor

@pp449 pp449 left a comment

Choose a reason for hiding this comment

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

로그아웃 상태로 로그인 권한이 필요한 페이지에 접근했을 때 캐릭터 보여주는거 귀엽네요 ㅎㅎ

해당 페이지에 뒤로가기나 홈으로 가기 버튼을 만들어주는건 어떤가요?
그 외에 추가적으로 유저가 존재하지 않는 페이지에 접근했을 때 페이지 처리도 같이 하는건 어떨까요??

{
path: `profile/:username`,
element: <UserProfile />,
element: <PrivateRoute />,
Copy link
Member

Choose a reason for hiding this comment

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

로그인 상태에 따라 보여주는 거 좋은 것 같네용
다르 의견처럼 존재하지 않는 페이지 접근도 다른 이슈에서 처리해주면 좋을 것 같아요~~

@github-actions github-actions bot requested review from 00kang and pp449 October 11, 2024 01:27
@00kang
Copy link
Member

00kang commented Oct 11, 2024

홈화면 바로가기 버튼 굳

Copy link
Contributor

@pp449 pp449 left a comment

Choose a reason for hiding this comment

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

유저가 존재하지 않는 페이지에 접근했을 때 페이지 처리도 같이 하는건 어떨까요??

요거는 제가 처리했네요 ㅎㅎ

@pp449 pp449 merged commit 6298a51 into develop Oct 11, 2024
2 checks passed
@pp449 pp449 deleted the feat/#551 branch October 11, 2024 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트 개발 관련 작업 기능 기능 구현 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 로그인하지 않은 상태에서 페이지에 접근할 때 처리
3 participants