浏览代码

:fire: useEffect

visuddhinanda 3 年之前
父节点
当前提交
b4c5582534
共有 1 个文件被更改,包括 0 次插入 和 4 次删除
  1. 0 4
      dashboard/src/pages/library/discussion/topic.tsx

+ 0 - 4
dashboard/src/pages/library/discussion/topic.tsx

@@ -15,10 +15,6 @@ const Widget = () => {
   const href = window.location.href.split("#");
   const href = window.location.href.split("#");
   const anchor = href.length > 1 ? href[1] : undefined;
   const anchor = href.length > 1 ? href[1] : undefined;
 
 
-  useEffect(() => {
-    const ele = document.getElementById(`answer-${anchor}`);
-    ele?.scrollIntoView();
-  });
   return (
   return (
     <>
     <>
       <CommentAnchor resId={discussion?.resId} resType={discussion?.resType} />
       <CommentAnchor resId={discussion?.resId} resType={discussion?.resType} />