Yidadaa 1 year ago
parent
commit
ae8050a3f7
1 changed files with 9 additions and 0 deletions
  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 (