From 35fe45942046903403e39a7dc2b8d3dc74458bf0 Mon Sep 17 00:00:00 2001 From: jialin Date: Sun, 2 Mar 2025 21:08:13 +0800 Subject: [PATCH] chore: init wrapper scroller --- src/components/logs-viewer/logs-list.tsx | 2 +- src/pages/playground/components/ground-embedding.tsx | 2 +- src/pages/playground/components/ground-left.tsx | 2 +- src/pages/playground/components/ground-reranker.tsx | 2 +- src/pages/playground/components/ground-stt.tsx | 4 ++-- src/pages/playground/components/ground-tts.tsx | 4 ++-- src/pages/playground/hooks/use-text-image.ts | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/logs-viewer/logs-list.tsx b/src/components/logs-viewer/logs-list.tsx index ed022a5c..23e8f8cf 100644 --- a/src/components/logs-viewer/logs-list.tsx +++ b/src/components/logs-viewer/logs-list.tsx @@ -112,7 +112,7 @@ const LogsList: React.FC = forwardRef((props, ref) => { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (dataList.length && !stopScroll.current && instance) { diff --git a/src/pages/playground/components/ground-embedding.tsx b/src/pages/playground/components/ground-embedding.tsx index a9a1d1fe..45cc8b06 100644 --- a/src/pages/playground/components/ground-embedding.tsx +++ b/src/pages/playground/components/ground-embedding.tsx @@ -451,7 +451,7 @@ const GroundEmbedding: React.FC = forwardRef((props, ref) => { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (textList.length + fileList.length > messageListLengthCache.current) { diff --git a/src/pages/playground/components/ground-left.tsx b/src/pages/playground/components/ground-left.tsx index 194b5ac5..a8db82a1 100644 --- a/src/pages/playground/components/ground-left.tsx +++ b/src/pages/playground/components/ground-left.tsx @@ -108,7 +108,7 @@ const GroundLeft: React.FC = forwardRef((props, ref) => { if (paramsRef.current) { innitializeParams(paramsRef.current); } - }, [paramsRef.current, innitializeParams]); + }, [innitializeParams]); return (
diff --git a/src/pages/playground/components/ground-reranker.tsx b/src/pages/playground/components/ground-reranker.tsx index a4c816ee..fc19685f 100644 --- a/src/pages/playground/components/ground-reranker.tsx +++ b/src/pages/playground/components/ground-reranker.tsx @@ -446,7 +446,7 @@ const GroundReranker: React.FC = forwardRef((props, ref) => { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (textList.length + fileList.length > messageListLengthCache.current) { diff --git a/src/pages/playground/components/ground-stt.tsx b/src/pages/playground/components/ground-stt.tsx index 9581ad7e..5d3ce86c 100644 --- a/src/pages/playground/components/ground-stt.tsx +++ b/src/pages/playground/components/ground-stt.tsx @@ -282,13 +282,13 @@ const GroundSTT: React.FC = forwardRef((props, ref) => { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (paramsRef.current) { innitializeParams(paramsRef.current); } - }, [paramsRef.current, innitializeParams]); + }, [innitializeParams]); useEffect(() => { if (loading) { diff --git a/src/pages/playground/components/ground-tts.tsx b/src/pages/playground/components/ground-tts.tsx index 5fd7bef1..b08a9510 100644 --- a/src/pages/playground/components/ground-tts.tsx +++ b/src/pages/playground/components/ground-tts.tsx @@ -311,13 +311,13 @@ const GroundTTS: React.FC = forwardRef((props, ref) => { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (paramsRef.current) { innitializeParams(paramsRef.current); } - }, [paramsRef.current, innitializeParams]); + }, [innitializeParams]); return (
diff --git a/src/pages/playground/hooks/use-text-image.ts b/src/pages/playground/hooks/use-text-image.ts index 15a48246..ada18f2e 100644 --- a/src/pages/playground/hooks/use-text-image.ts +++ b/src/pages/playground/hooks/use-text-image.ts @@ -39,12 +39,12 @@ export default function useTextImage(props: any) { if (scroller.current) { initialize(scroller.current); } - }, [scroller.current, initialize]); + }, [initialize]); useEffect(() => { if (paramsRef.current) { innitializeParams(paramsRef.current); } - }, [paramsRef.current, innitializeParams]); + }, [innitializeParams]); const removeBase64Suffix = (str: string, suffix: string) => { return str.endsWith(suffix) ? str.slice(0, -suffix.length) : str;