(
el: HTMLElement | undefined,
state: ReturnType<typeof useStore.getState>
)
| 1808 | } |
| 1809 | |
| 1810 | function scrollToCommentElement( |
| 1811 | el: HTMLElement | undefined, |
| 1812 | state: ReturnType<typeof useStore.getState> |
| 1813 | ): void { |
| 1814 | if (!el) return |
| 1815 | const commentId = el.dataset.commentId |
| 1816 | if (commentId) state.setActiveCommentId(commentId) |
| 1817 | el.scrollIntoView({ block: 'nearest' }) |
| 1818 | } |
| 1819 | |
| 1820 | function focusCommentsPanel(state: ReturnType<typeof useStore.getState>): void { |
| 1821 | const panel = document.querySelector<HTMLElement>('[data-comments-panel]') |
no outgoing calls
no test coverage detected