11import React , { useState , useRef , useEffect , useCallback } from "react" ;
22import { useInfiniteScroll } from "ahooks" ;
33import { useTranslation } from "react-i18next" ;
4+ import { Data } from "ahooks/lib/useInfiniteScroll/types" ;
5+ import { nanoid } from "nanoid" ;
6+ import { isNil } from "lodash-es" ;
47
58import { useSearchStore } from "@/stores/searchStore" ;
69import { SearchHeader } from "./SearchHeader" ;
@@ -11,9 +14,7 @@ import { Get } from "@/api/axiosRequest";
1114import { useAppStore } from "@/stores/appStore" ;
1215import { useConnectStore } from "@/stores/connectStore" ;
1316import SearchEmpty from "../Common/SearchEmpty" ;
14- import { Data } from "ahooks/lib/useInfiniteScroll/types" ;
15- import { nanoid } from "nanoid" ;
16- import { isNil } from "lodash-es" ;
17+ import Scrollbar from "@/components/Common/Scrollbar" ;
1718
1819interface DocumentListProps {
1920 onSelectDocument : ( id : string ) => void ;
@@ -297,8 +298,8 @@ export const DocumentList: React.FC<DocumentListProps> = ({
297298 />
298299 </ div >
299300
300- < div
301- className = "flex-1 overflow-auto custom-scrollbar pr-0.5"
301+ < Scrollbar
302+ className = "flex-1 overflow-auto pr-0.5"
302303 ref = { containerRef }
303304 >
304305 { data ?. list && data . list . length > 0 && (
@@ -334,7 +335,7 @@ export const DocumentList: React.FC<DocumentListProps> = ({
334335 < SearchEmpty />
335336 </ div >
336337 ) }
337- </ div >
338+ </ Scrollbar >
338339 </ div >
339340 ) ;
340341} ;
0 commit comments