Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 스크롤 초기화 #405

Merged
merged 3 commits into from
Aug 16, 2024
Merged

[Fix] 스크롤 초기화 #405

merged 3 commits into from
Aug 16, 2024

Conversation

lydiacho
Copy link
Member

Related Issue : Closes #385


🧑‍🎤 Summary

스크롤 위치 초기화

🧑‍🎤 Comment

리로딩될 때는 문제가 없지만, 컴포넌트가 갈아껴지는 경우엔 스크롤 위치가 초기화되지 않는 곳들이 있더라구요 (ex- 이슈에 캡쳐해둔 ReviewPage 처럼)

따라서 Router 내부의 최상위인 Layout에서 path에 따라 scroll 위치 초기화시켜주는 로직 추가했습니다!

추가로, 동적으로 helmet 설정하는 코드와, 스크롤 초기화하는 코드가 모두 Layout.tsx 안에 들어있는게 보기 지저분해서,
Layout > components > settings 안에 컴포넌트로 분리해서 넣어줬어요

Copy link

height bot commented Aug 16, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@lydiacho lydiacho merged commit 8a29f3a into develop Aug 16, 2024
@lydiacho lydiacho deleted the fix/#385_scroll-init branch August 16, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] ResultPage 스크롤 초기화
1 participant