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])
|
||||
|
||||
const selectedFrame = storyboard?.frames.find((f) => f.id === selectedFrameId)
|
||||
|
||||
// Audio playback sync
|
||||
useEffect(() => {
|
||||
if (!audioRef.current) return
|
||||
@@ -112,8 +114,6 @@ export function PreviewPlayer() {
|
||||
}
|
||||
}, [selectedFrameId])
|
||||
|
||||
const selectedFrame = storyboard?.frames.find((f) => f.id === selectedFrameId)
|
||||
|
||||
// Calculate canvas size when entering inpainting mode
|
||||
useEffect(() => {
|
||||
if (isInpaintingMode && selectedFrame?.imagePath) {
|
||||
|
||||
Reference in New Issue
Block a user