비로그인 유저가 board로 들어가서 무한 리다이렉트 일어나는 문제 해결 #111
Merged
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.
로직 반전:
로그인 페이지는 비로그인 사용자만 접근 가능
로그인된 사용자는 /boards로 리다이렉트
replace 속성 추가:
replace prop을 사용하여 브라우저 히스토리 스택이 쌓이는 것을 방지
루트 경로 처리 개선:
로그인 상태에 따라 적절한 페이지로 리다이렉트
명확한 조건부 리다이렉션:
각 라우트의 리다이렉션 조건을 명확하게 정의