fix: add missing onUpdateTrack prop to Track component

Fixed "onUpdateTrack is not defined" error by:
- Added onUpdateTrack to TrackProps interface
- Added onUpdateTrack to Track component destructuring
- Passed onUpdateTrack prop from TrackList to Track

This prop is required for:
- Track height resizing functionality
- Automation lane updates
- General track property updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-18 16:44:19 +01:00
parent ecf7f060ec
commit 839128a93f
2 changed files with 3 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ export interface TrackProps {
onPanChange: (pan: number) => void;
onRemove: () => void;
onNameChange: (name: string) => void;
onUpdateTrack: (trackId: string, updates: Partial<TrackType>) => void;
onSeek?: (time: number) => void;
onLoadAudio?: (buffer: AudioBuffer) => void;
onToggleEffect?: (effectId: string) => void;
@@ -57,6 +58,7 @@ export function Track({
onPanChange,
onRemove,
onNameChange,
onUpdateTrack,
onSeek,
onLoadAudio,
onToggleEffect,

View File

@@ -114,6 +114,7 @@ export function TrackList({
onNameChange={(name) =>
onUpdateTrack(track.id, { name })
}
onUpdateTrack={onUpdateTrack}
onSeek={onSeek}
onLoadAudio={(buffer) =>
onUpdateTrack(track.id, { audioBuffer: buffer })