소스 검색

Merge pull request #1191 from Yidadaa/bugfix-0501

fixup
Yifei Zhang 1 년 전
부모
커밋
5dbb6afc60
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      app/components/markdown.tsx

+ 9 - 0
app/components/markdown.tsx

@@ -90,6 +90,15 @@ export function Markdown(
     }
   };
 
+  useEffect(() => {
+    setTimeout(() => {
+      if (!inView.current) {
+        checkInView();
+      }
+    }, 30);
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, []);
+
   checkInView();
 
   return (