diff --git a/packages/ui-next/src/components/primitives/scroll-area.tsx b/packages/ui-next/src/components/primitives/scroll-area.tsx index 95eacccca..296b5538a 100644 --- a/packages/ui-next/src/components/primitives/scroll-area.tsx +++ b/packages/ui-next/src/components/primitives/scroll-area.tsx @@ -12,8 +12,12 @@ const ScrollArea = React.forwardRef< // If the scrollbar is not hidden, it remains visible for 500ms before fading out const [opacity, setOpacity] = React.useState(0); const [hidden, setHidden] = React.useState(true); - const opacityTimeout = React.useRef(null); - const hiddenTimeout = React.useRef(null); + const opacityTimeout = React.useRef | null>( + null, + ); + const hiddenTimeout = React.useRef | null>( + null, + ); // Set visible each time the scrollbar is used const onScrollCapture = React.useCallback(() => {