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.
Related Issue : Closes #385
🧑🎤 Summary
스크롤 위치 초기화
🧑🎤 Comment
리로딩될 때는 문제가 없지만, 컴포넌트가 갈아껴지는 경우엔 스크롤 위치가 초기화되지 않는 곳들이 있더라구요 (ex- 이슈에 캡쳐해둔 ReviewPage 처럼)
따라서 Router 내부의 최상위인 Layout에서 path에 따라 scroll 위치 초기화시켜주는 로직 추가했습니다!
추가로, 동적으로 helmet 설정하는 코드와, 스크롤 초기화하는 코드가 모두 Layout.tsx 안에 들어있는게 보기 지저분해서,
Layout > components > settings
안에 컴포넌트로 분리해서 넣어줬어요