fix: add missing Sparkles import and correct AutomationLane props
- Add Sparkles icon import to TrackExtensions - Remove invalid props from AutomationLane (trackId, isPlaying, onSeek) - Fix createAutomationPoint call to use object parameter with curve property 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Plus, ChevronDown, ChevronRight } from 'lucide-react';
|
import { Plus, ChevronDown, ChevronRight, Sparkles } from 'lucide-react';
|
||||||
import type { Track as TrackType } from '@/types/track';
|
import type { Track as TrackType } from '@/types/track';
|
||||||
import { Button } from '@/components/ui/Button';
|
import { Button } from '@/components/ui/Button';
|
||||||
import { cn } from '@/lib/utils/cn';
|
import { cn } from '@/lib/utils/cn';
|
||||||
|
|||||||
@@ -412,13 +412,11 @@ export function TrackList({
|
|||||||
<div key={lane.id} className="h-32">
|
<div key={lane.id} className="h-32">
|
||||||
<AutomationLane
|
<AutomationLane
|
||||||
lane={lane}
|
lane={lane}
|
||||||
trackId={track.id}
|
|
||||||
zoom={zoom}
|
zoom={zoom}
|
||||||
currentTime={currentTime}
|
currentTime={currentTime}
|
||||||
duration={duration}
|
duration={duration}
|
||||||
isPlaying={isPlaying}
|
|
||||||
onAddPoint={(time, value) => {
|
onAddPoint={(time, value) => {
|
||||||
const newPoint = createAutomationPoint(time, value);
|
const newPoint = createAutomationPoint({ time, value, curve: 'linear' });
|
||||||
const updatedLanes = track.automation.lanes.map((l) =>
|
const updatedLanes = track.automation.lanes.map((l) =>
|
||||||
l.id === lane.id
|
l.id === lane.id
|
||||||
? { ...l, points: [...l.points, newPoint].sort((a, b) => a.time - b.time) }
|
? { ...l, points: [...l.points, newPoint].sort((a, b) => a.time - b.time) }
|
||||||
@@ -461,7 +459,6 @@ export function TrackList({
|
|||||||
automation: { ...track.automation, lanes: updatedLanes },
|
automation: { ...track.automation, lanes: updatedLanes },
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
onSeek={onSeek}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user