Yidadaa 1 سال پیش
والد
کامیت
ae8050a3f7
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 (