fix: Move selectedFrame definition before useEffect that references it
This commit is contained in:
@@ -86,6 +86,8 @@ export function PreviewPlayer() {
|
|||||||
}
|
}
|
||||||
}, [isPlaying, storyboard, setCurrentTime, setPlaying])
|
}, [isPlaying, storyboard, setCurrentTime, setPlaying])
|
||||||
|
|
||||||
|
const selectedFrame = storyboard?.frames.find((f) => f.id === selectedFrameId)
|
||||||
|
|
||||||
// Audio playback sync
|
// Audio playback sync
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!audioRef.current) return
|
if (!audioRef.current) return
|
||||||
@@ -112,8 +114,6 @@ export function PreviewPlayer() {
|
|||||||
}
|
}
|
||||||
}, [selectedFrameId])
|
}, [selectedFrameId])
|
||||||
|
|
||||||
const selectedFrame = storyboard?.frames.find((f) => f.id === selectedFrameId)
|
|
||||||
|
|
||||||
// Calculate canvas size when entering inpainting mode
|
// Calculate canvas size when entering inpainting mode
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isInpaintingMode && selectedFrame?.imagePath) {
|
if (isInpaintingMode && selectedFrame?.imagePath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user