-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 스크롤 관련 구현 #68
[feat] 스크롤 관련 구현 #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다.
|
||
function CommentSection() { | ||
const SECTION_IDX = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0~3까지, 즉 useSectionInitialize가 사용하는 매직넘버를 별도의 상수로 분리해서 관리한다면, 모달 등 다른 페이지에서 명시적으로 쓰기 편할 겁니다.
export default function scrollTo(scrollIndex) { | ||
const state = useSectionStore.getState(); | ||
const sectionDOM = state.sectionList[scrollIndex]; | ||
sectionDOM.scrollIntoView({ behavior: "smooth" }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다
#️⃣ 연관 이슈
📝 작업 내용