From b80d55b7649015bd4f4984806583fd23c9372161 Mon Sep 17 00:00:00 2001 From: lyzno1 <92089059+lyzno1@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:08:57 +0800 Subject: [PATCH] fix: add missing key prop to TabPanel and initialize useRef with null (#26517) --- web/app/components/develop/code.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/develop/code.tsx b/web/app/components/develop/code.tsx index eadc87a5ca..69d5624966 100644 --- a/web/app/components/develop/code.tsx +++ b/web/app/components/develop/code.tsx @@ -193,8 +193,8 @@ function CodeGroupPanels({ children, targetCode, ...props }: ICodeGroupPanelsPro if ((targetCode?.length ?? 0) > 1) { return ( - {targetCode!.map(code => ( - + {targetCode!.map((code, index) => ( + ))} @@ -206,8 +206,8 @@ function CodeGroupPanels({ children, targetCode, ...props }: ICodeGroupPanelsPro } function usePreventLayoutShift() { - const positionRef = useRef() - const rafRef = useRef() + const positionRef = useRef(null) + const rafRef = useRef(null) useEffect(() => { return () => {