Skip to content

Commit e729fcf

Browse files
committed
style: code format
1 parent e6b2349 commit e729fcf

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

components/layouts/toc-tree.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,16 @@ export default function TocTree(props: TocTreeProps) {
8383

8484
useEffect(() => {
8585
const container = document.querySelector('.md-container');
86-
8786
if (!container) return;
8887

8988
containerRef.current = container as HTMLElement;
9089

9190
throttledScrollHandler();
9291
handleToc();
9392

94-
// const extracToc = Array.from(nodes.current).map((node) => ({
95-
// title: node.textContent,
96-
// id: node.id,
97-
// depth: +node.tagName[1],
98-
// }));
99-
// setList(extracToc);
100-
10193
window.addEventListener('scroll', throttledScrollHandler);
102-
10394
return () => window.removeEventListener('scroll', throttledScrollHandler);
104-
// eslint-disable-next-line react-hooks/exhaustive-deps
105-
}, []);
95+
}, [handleToc, throttledScrollHandler]);
10696

10797
useMutationObserver(containerRef.current, handleToc);
10898

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsonq",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"private": true,
55
"author": {
66
"name": "jsonq",

0 commit comments

Comments
 (0)