fix: remove unused isPlaying state variable in VideoPlayer #38

Merged
tanyar09 merged 1 commits from fix/video-player-typescript-error into dev 2026-02-11 12:28:31 -05:00

View File

@ -6,7 +6,6 @@ export default function VideoPlayer() {
const { id } = useParams<{ id: string }>()
const videoId = id ? parseInt(id, 10) : null
const videoRef = useRef<HTMLVideoElement>(null)
const [isPlaying, setIsPlaying] = useState(false)
const [showPlayButton, setShowPlayButton] = useState(true)
const videoUrl = videoId ? videosApi.getVideoUrl(videoId) : ''
@ -14,13 +13,11 @@ export default function VideoPlayer() {
const handlePlay = () => {
if (videoRef.current) {
videoRef.current.play()
setIsPlaying(true)
setShowPlayButton(false)
}
}
const handlePause = () => {
setIsPlaying(false)
setShowPlayButton(true)
}
@ -34,17 +31,14 @@ export default function VideoPlayer() {
if (!video) return
const handlePlayEvent = () => {
setIsPlaying(true)
setShowPlayButton(false)
}
const handlePauseEvent = () => {
setIsPlaying(false)
setShowPlayButton(true)
}
const handleEnded = () => {
setIsPlaying(false)
setShowPlayButton(true)
}