We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb72bc1 commit 3783d7aCopy full SHA for 3783d7a
apps/blog/web/src/components/mobile/MobileTOC.tsx
@@ -16,6 +16,19 @@ export const MobileTOC = () => {
16
const [toc, setToc] = useState<TOCItem[]>([]);
17
const [activeId, setActiveId] = useState<string>('');
18
19
+ // Body Scroll Lock
20
+ useEffect(() => {
21
+ if (isOpen) {
22
+ document.body.style.overflow = 'hidden';
23
+ } else {
24
+ document.body.style.overflow = 'unset';
25
+ }
26
+
27
+ return () => {
28
29
+ };
30
+ }, [isOpen]);
31
32
useEffect(() => {
33
// DOM이 렌더링된 후 헤더를 찾습니다.
34
const updateToc = () => {
0 commit comments