Fix TypeScript ref typings and lint errors
This commit is contained in:
@@ -32,8 +32,8 @@ export const ControlsLayer: React.FC<ControlsLayerProps> = ({
|
||||
usePlayerContext()
|
||||
const [isPointerOver, setIsPointerOver] = useState(false)
|
||||
const [lastInteraction, setLastInteraction] = useState<number>(0)
|
||||
const hideTimeoutRef = useRef<number>()
|
||||
const containerRef = useRef<HTMLDivElement>(null)
|
||||
const hideTimeoutRef = useRef<number | undefined>(undefined)
|
||||
const containerRef = useRef<HTMLDivElement | null>(null)
|
||||
const lastClickTimeRef = useRef<number>(0)
|
||||
const isMenuOpen =
|
||||
uiState.settingsOpen ||
|
||||
|
||||
@@ -6,7 +6,7 @@ import './VolumeControl.css'
|
||||
export const VolumeControl: React.FC = () => {
|
||||
const { videoState, setVolume, toggleMute } = usePlayerContext()
|
||||
const [showSlider, setShowSlider] = useState(false)
|
||||
const timeoutRef = useRef<number>()
|
||||
const timeoutRef = useRef<number | undefined>(undefined)
|
||||
|
||||
const handleMouseEnter = useCallback(() => {
|
||||
if (timeoutRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user