[feat] ProtectedRoute 컴포넌트 구현, 내 프로필/공고 상세 (사장님, 알바생) 페이지 적용 #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
Closes #137
📝 PR 유형
📝작업 내용
ProtectedRoute컴포넌트 구현ProtectedRoute사용 예시제가 생각하는 이 방식의 장점은
a. 페이지 마다 페이지 접근 제어 로직을 작성하면, 해당 페이지가 어떤 권한을 가지고 있는지 매번 각각의 페이지를 들여다 봐야 함
src/Router.tsx파일 하나만 보면 알 수 있음단점은
Router.tsx파일이 길어져서 가독성이 좋지 못함a. 이 부분은 각 도메인 별로 파일을 분리하면 어느정도 해결할 수 있을 것 같아요. 🤔
스크린샷 (선택)
💬리뷰 요구사항(선택)