[#2] 기타 UI 구현 - Header 컴포넌트, NotFound 페이지 컴포넌트 #3
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.
해결한 이슈
해결 방법
NotFound 페이지 정보 중, 오류 요청 URL 정보 출력
location.href
만 적용한다면 초기 렌더링은 정상 작동하나, 다른 존재하지 않는 페이지 라우팅 시 이전과 동일한 URL 을 보여주는 현상 발생react-router-dom
의useLocation
훅을 사용하나, 결과 객체의 Full URL 을 제공하진 않음 ->pathname
프로퍼티만 사용, 나머지 정보(protocal, host, port)는window.location
객체 정보를 사용하기로 함.캡처 첨부
추가적인 태스크
PR Submit 이전에 확인하세요 !
체크리스트