fix: remove unused isPlaying state variable in VideoPlayer
All checks were successful
CI / skip-ci-check (pull_request) Successful in 17s
CI / lint-and-type-check (pull_request) Successful in 1m1s
CI / python-lint (pull_request) Successful in 41s
CI / test-backend (pull_request) Successful in 2m45s
CI / build (pull_request) Successful in 3m31s
CI / secret-scanning (pull_request) Successful in 25s
CI / dependency-scan (pull_request) Successful in 21s
CI / sast-scan (pull_request) Successful in 1m38s
CI / workflow-summary (pull_request) Successful in 16s
All checks were successful
CI / skip-ci-check (pull_request) Successful in 17s
CI / lint-and-type-check (pull_request) Successful in 1m1s
CI / python-lint (pull_request) Successful in 41s
CI / test-backend (pull_request) Successful in 2m45s
CI / build (pull_request) Successful in 3m31s
CI / secret-scanning (pull_request) Successful in 25s
CI / dependency-scan (pull_request) Successful in 21s
CI / sast-scan (pull_request) Successful in 1m38s
CI / workflow-summary (pull_request) Successful in 16s
- Remove unused isPlaying state that was causing TypeScript error TS6133 - Component only needs showPlayButton to control play button overlay visibility - Fixes build error: 'isPlaying' is declared but its value is never read
This commit is contained in:
parent
726b36db80
commit
fae8afaf84
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user