Skip to content

Conversation

@dlcks0601
Copy link
Contributor

#️⃣연관된 이슈

#25

📝작업 내용

  1. 관리자 페이지 구현 c62a43a
  2. 관리자 페이지 라우팅 e9310d1 17b5b33
  3. 메뉴에서 유저 로그인 -> 마이페이지, 관리자 로그인 -> 관리자페이지 81364da ef81295
  4. 헤더 로고 수정 로고 클릭시 메인페이지로 이동할수있게 수정 f568322

스크린샷 (선택)

관리자 로그인
스크린샷 2024-12-18 오전 1 28 09

유저 로그인
스크린샷 2024-12-18 오전 1 28 41

관리자 페이지
스크린샷 2024-12-18 오전 1 29 37

💬리뷰 요구사항(선택)

@dlcks0601 dlcks0601 changed the base branch from main to develop December 18, 2024 04:39
Comment on lines +14 to +22
if (!userInfo) {
return <Navigate to='/login' replace />;
} else if (!allowedRoles.includes(userInfo.role)) {
}

// 역할이 허용되지 않은 경우
if (!allowedRoles.includes(userInfo.role)) {
return <Navigate to='/' replace />;
}
Copy link

Choose a reason for hiding this comment

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

위의 else if는 실수겠죠? 😄

404페이지가 있다면 거기로 넘겨버려도 괜찮을지도 모르겠네요.

덤으로 파일 이름도 AdminRoute가 아닌 ProtectedRoute로 바꾸면 조금 더 혼란이 적어질 것 같아요~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants