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] refactor : 회원 전용 페이지 path 수정 #1070

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

BadaHertz52
Copy link
Contributor


🚀 어떤 기능을 구현했나요 ?

  • 로그인 후 접근해야하는 페이지를 간별할 수 있게 회원 전용 페이지 path에 'logged-in'을 추가했습니다.
  • makeRoutePath 유틸함수를 만들어서 보다 편리하게 path를 추가/변경할 수 있도록 했습니다.

📚 참고 자료, 할 말

  • 비로그인 시, 회원 전용 페이지에 접근한 경우 접근 권한 메세지를 보여주고 로그인을 유도하는 UI는 로그인 구현해야해요. 로그인 구현 시, 로그인 된 상태를 어떻게 처리하는 가를 함께 고려해야해서 현재 작업에는 포함되지 않았습니다.

Copy link
Contributor

@ImxYJL ImxYJL left a comment

Choose a reason for hiding this comment

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

유틸 함수 덕분에 나중에 더 편할 것 같아요~!

@@ -0,0 +1,5 @@
export const makeRoutePath = (pageName: string, isForMember: boolean = false) => {
let basic = 'user';
if (isForMember) basic += '/logged-in';
Copy link
Contributor

Choose a reason for hiding this comment

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

isMemberOnly같은 네이밍도 제안해봅니다~

Copy link
Contributor

@chysis chysis left a comment

Choose a reason for hiding this comment

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

관리해야 할 라우트 경로들이 많아졌는데, 쉽게 유지 보수할 수 있을 것 같아요👍🏻

Copy link
Contributor

@soosoo22 soosoo22 left a comment

Choose a reason for hiding this comment

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

path를 쉽게 관리할 수 있을 것 같네요!!
고생했어용 바다:)

@BadaHertz52 BadaHertz52 merged commit 4139a07 into develop Jan 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FE] 회원 전용 페이지 path에 'logged-in'을 추가한다
4 participants