visuddhinanda 2 лет назад
Родитель
Сommit
b1990607d7
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      dashboard/src/components/article/NavigateButton.tsx

+ 1 - 4
dashboard/src/components/article/NavigateButton.tsx

@@ -1,7 +1,7 @@
 import { Affix, Button, Dropdown, Space, Typography } from "antd";
 import { DoubleRightOutlined, DoubleLeftOutlined } from "@ant-design/icons";
 import { ITocPathNode } from "../corpus/TocPath";
-import { useRef } from "react";
+import { useEffect, useRef } from "react";
 
 const { Paragraph, Text } = Typography;
 
@@ -37,9 +37,6 @@ const NavigateButtonWidget = ({
 }: IWidget) => {
   const currTitle = path && path.length > 0 ? path[path.length - 1].title : "";
 
-  const affixRef = useRef<any>();
-  affixRef?.current?.updatePosition();
-
   return (
     <Paragraph
       style={{